• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2018 The Chromium Authors
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_STACKS_CALL_STACK_PROFILE_ENCODING_H_
6 #define COMPONENTS_METRICS_CALL_STACKS_CALL_STACK_PROFILE_ENCODING_H_
7 
8 #include "components/sampling_profiler/call_stack_profile_params.h"
9 #include "components/sampling_profiler/process_type.h"
10 #include "third_party/metrics_proto/sampled_profile.pb.h"
11 
12 namespace metrics {
13 
14 // Translates CallStackProfileParams's process to the corresponding execution
15 // context Process.
16 Process ToExecutionContextProcess(
17     sampling_profiler::ProfilerProcessType process);
18 
19 // Translates CallStackProfileParams's thread to the corresponding
20 // SampledProfile Thread.
21 Thread ToExecutionContextThread(sampling_profiler::ProfilerThreadType thread);
22 
23 // Translates CallStackProfileParams's trigger to the corresponding
24 // SampledProfile TriggerEvent.
25 SampledProfile::TriggerEvent ToSampledProfileTriggerEvent(
26     sampling_profiler::CallStackProfileParams::Trigger trigger);
27 
28 }  // namespace metrics
29 
30 #endif  // COMPONENTS_METRICS_CALL_STACKS_CALL_STACK_PROFILE_ENCODING_H_
31