Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #ifndef CONTENT_PUBLIC_BROWSER_BACKGROUND_PREEMPTIVE_TRACING_CONFIG_H_ | |
| 6 #define CONTENT_PUBLIC_BROWSER_BACKGROUND_PREEMPTIVE_TRACING_CONFIG_H_ | |
| 7 | |
| 8 #include "content/public/browser/background_tracing_config.h" | |
| 9 | |
| 10 namespace content { | |
| 11 | |
| 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 | |
| 20 enum RuleType { | |
| 21 MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED, | |
| 22 MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE, | |
| 23 MONITOR_AND_DUMP_WHEN_BROWSER_STARTED, | |
|
no sievers
2015/05/14 21:25:17
nit: STARTED -> STARTUP_COMPLETE?
shatch
2015/05/15 21:00:51
Done.
| |
| 24 }; | |
| 25 struct HistogramTriggerInfo { | |
| 26 std::string histogram_name_to_trigger_on; | |
| 27 int histogram_bin_to_trigger_on; | |
| 28 }; | |
| 29 struct NamedTriggerInfo { | |
| 30 std::string trigger_name; | |
| 31 }; | |
| 32 struct MonitoringRule { | |
| 33 RuleType type; | |
| 34 HistogramTriggerInfo histogram_trigger_info; | |
| 35 NamedTriggerInfo named_trigger_info; | |
|
no sievers
2015/05/14 21:25:17
Ok now here subclassing would make sense since you
shatch
2015/05/15 21:00:51
Hrm, not quite following. Are you suggesting somet
| |
| 36 }; | |
| 37 | |
| 38 std::vector<MonitoringRule> configs; | |
| 39 CategoryPreset category_preset; | |
| 40 | |
| 41 protected: | |
| 42 ~BackgroundTracingPreemptiveConfig() override; | |
| 43 }; | |
| 44 | |
| 45 } // namespace content | |
| 46 | |
| 47 #endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_PREEMPTIVE_TRACING_CONFIG_H_ | |
| OLD | NEW |