[Android WebView] Fix webview perf bot switchover to use org.chromium.webview_shell...
[chromium-blink-merge.git] / content / public / browser / background_tracing_preemptive_config.h
blob4731f79622c4b2ed3206a0e18a51f57e72608f65
1 // Copyright 2015 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.
5 #ifndef CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_PREEMPTIVE_CONFIG_H_
6 #define CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_PREEMPTIVE_CONFIG_H_
8 #include "content/public/browser/background_tracing_config.h"
10 namespace content {
12 // BackgroundTracingPreemptiveConfig holds trigger rules for use during
13 // preemptive tracing. Tracing will be enabled immediately, and whenever
14 // a trigger occurs, the trace will be finalized.
15 struct CONTENT_EXPORT BackgroundTracingPreemptiveConfig
16 : public BackgroundTracingConfig {
17 public:
18 BackgroundTracingPreemptiveConfig();
19 ~BackgroundTracingPreemptiveConfig() override;
21 enum RuleType {
22 MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED,
23 MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE,
24 MONITOR_AND_DUMP_WHEN_BROWSER_STARTUP_COMPLETE,
26 struct HistogramTriggerInfo {
27 std::string histogram_name_to_trigger_on;
28 int histogram_bin_to_trigger_on;
30 struct NamedTriggerInfo {
31 std::string trigger_name;
33 struct MonitoringRule {
34 RuleType type;
35 HistogramTriggerInfo histogram_trigger_info;
36 NamedTriggerInfo named_trigger_info;
39 std::vector<MonitoringRule> configs;
40 CategoryPreset category_preset;
43 } // namespace content
45 #endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_PREEMPTIVE_CONFIG_H_