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

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

Issue 1089253003: Re-land first pass BackgroundTracingManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split config into separate headers and build fix. 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_reactive_config.h
diff --git a/content/public/browser/background_tracing_reactive_config.h b/content/public/browser/background_tracing_reactive_config.h
new file mode 100644
index 0000000000000000000000000000000000000000..12f45524470c063f73302ac375c1c09985cb8482
--- /dev/null
+++ b/content/public/browser/background_tracing_reactive_config.h
@@ -0,0 +1,37 @@
+// 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_REACTIVE_TRACING_CONFIG_H_
+#define CONTENT_PUBLIC_BROWSER_BACKGROUND_REACTIVE_TRACING_CONFIG_H_
+
+#include "content/public/browser/background_tracing_config.h"
+
+namespace content {
+
+// BackgroundTracingReactiveConfig holds trigger rules for use during
+// reactive tracing. Tracing will be not be enabled immediately, rather
+// the BackgroundTracingManager will wait for a trigger to occur, and
+// enable tracing at that point. Tracing will be finalized later, either
+// after some time has elapsed or the trigger occurs again.
+struct CONTENT_EXPORT BackgroundTracingReactiveConfig
+ : public BackgroundTracingConfig {
+ public:
+ BackgroundTracingReactiveConfig();
+
+ enum RuleType { TRACE_ON_TRIGGER_UNTIL_10S_OR_NEXT_TRIGGER_OR_FULL };
no sievers 2015/05/14 21:25:17 nit: so this is TRACE_ON_MANUAL_TRIGGER_...?
shatch 2015/05/15 21:00:51 Done.
+ struct TracingRule {
+ RuleType type;
+ std::string trigger_name;
+ CategoryPreset category_preset;
no sievers 2015/05/14 21:25:17 Aha, that's interesting that you allow multiple ca
shatch 2015/05/15 21:00:51 This mode (reactive) doesn't start tracing until a
+ };
+
+ std::vector<TracingRule> configs;
+
+ protected:
+ ~BackgroundTracingReactiveConfig() override;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_REACTIVE_TRACING_CONFIG_H_

Powered by Google App Engine
This is Rietveld 408576698