blob: c71ace7e636fd41e410ba531a87391e0677f9e56 [file] [log] [blame]
Xi Cheng74c06d862018-08-16 01:06:481// Copyright 2018 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef COMPONENTS_METRICS_CALL_STACK_PROFILE_ENCODING_H_
6#define COMPONENTS_METRICS_CALL_STACK_PROFILE_ENCODING_H_
7
8#include "components/metrics/call_stack_profile_params.h"
9#include "third_party/metrics_proto/sampled_profile.pb.h"
10
11namespace metrics {
12
13// Translates CallStackProfileParams's process to the corresponding execution
14// context Process.
15Process ToExecutionContextProcess(CallStackProfileParams::Process process);
16
17// Translates CallStackProfileParams's thread to the corresponding
18// SampledProfile Thread.
19Thread ToExecutionContextThread(CallStackProfileParams::Thread thread);
20
21// Translates CallStackProfileParams's trigger to the corresponding
22// SampledProfile TriggerEvent.
23SampledProfile::TriggerEvent ToSampledProfileTriggerEvent(
24 CallStackProfileParams::Trigger trigger);
25
26} // namespace metrics
27
28#endif // COMPONENTS_METRICS_CALL_STACK_PROFILE_ENCODING_H_