Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1010)

Unified Diff: content/public/browser/background_tracing_preemptive_config.h

Issue 1089253003: Re-land first pass BackgroundTracingManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Scoped_ptr Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/browser/background_tracing_preemptive_config.h
diff --git a/content/public/browser/background_tracing_preemptive_config.h b/content/public/browser/background_tracing_preemptive_config.h
new file mode 100644
index 0000000000000000000000000000000000000000..4731f79622c4b2ed3206a0e18a51f57e72608f65
--- /dev/null
+++ b/content/public/browser/background_tracing_preemptive_config.h
@@ -0,0 +1,45 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_PREEMPTIVE_CONFIG_H_
+#define CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_PREEMPTIVE_CONFIG_H_
+
+#include "content/public/browser/background_tracing_config.h"
+
+namespace content {
+
+// BackgroundTracingPreemptiveConfig holds trigger rules for use during
+// preemptive tracing. Tracing will be enabled immediately, and whenever
+// a trigger occurs, the trace will be finalized.
+struct CONTENT_EXPORT BackgroundTracingPreemptiveConfig
+ : public BackgroundTracingConfig {
+ public:
+ BackgroundTracingPreemptiveConfig();
+ ~BackgroundTracingPreemptiveConfig() override;
+
+ enum RuleType {
+ MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED,
+ MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE,
+ MONITOR_AND_DUMP_WHEN_BROWSER_STARTUP_COMPLETE,
+ };
+ struct HistogramTriggerInfo {
+ std::string histogram_name_to_trigger_on;
+ int histogram_bin_to_trigger_on;
+ };
+ struct NamedTriggerInfo {
+ std::string trigger_name;
+ };
+ struct MonitoringRule {
+ RuleType type;
+ HistogramTriggerInfo histogram_trigger_info;
+ NamedTriggerInfo named_trigger_info;
+ };
+
+ std::vector<MonitoringRule> configs;
+ CategoryPreset category_preset;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_PREEMPTIVE_CONFIG_H_
« no previous file with comments | « content/public/browser/background_tracing_manager.h ('k') | content/public/browser/background_tracing_preemptive_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698