blob: e23658f141e0c6c51bfcbfde366dee04ec1a24c2 [file] [log] [blame]
Avi Drissman8ba1bad2022-09-13 19:22:361// Copyright 2018 The Chromium Authors
Xi Cheng74c06d862018-08-16 01:06:482// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Caitlin Fischer0eedde442023-12-04 18:03:265#ifndef COMPONENTS_METRICS_CALL_STACKS_CALL_STACK_PROFILE_ENCODING_H_
6#define COMPONENTS_METRICS_CALL_STACKS_CALL_STACK_PROFILE_ENCODING_H_
Xi Cheng74c06d862018-08-16 01:06:487
Caitlin Fischer0eedde442023-12-04 18:03:268#include "components/metrics/call_stacks/call_stack_profile_params.h"
Xi Cheng74c06d862018-08-16 01:06:489#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
Caitlin Fischer0eedde442023-12-04 18:03:2628#endif // COMPONENTS_METRICS_CALL_STACKS_CALL_STACK_PROFILE_ENCODING_H_