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

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

Issue 425593002: Refactor trace_event_impl's SetEnabled to use TraceOptions. Propagate this through the whole stack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pull enable_systrace to TraceOptions Created 6 years, 5 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/tracing_controller.h
diff --git a/content/public/browser/tracing_controller.h b/content/public/browser/tracing_controller.h
index 68184a5a844deaa2cb752643ccfb6a1e57fe011d..ebcf2692ee407f0d49f492ef5ef659b0f4f758b2 100644
--- a/content/public/browser/tracing_controller.h
+++ b/content/public/browser/tracing_controller.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/callback.h"
+#include "base/debug/trace_event.h"
#include "content/common/content_export.h"
namespace base {
@@ -25,12 +26,6 @@ class TracingController;
// the UI thread.
class TracingController {
public:
- enum Options {
- DEFAULT_OPTIONS = 0,
- ENABLE_SYSTRACE = 1 << 0,
- ENABLE_SAMPLING = 1 << 1,
- RECORD_CONTINUOUSLY = 1 << 2, // For EnableRecording() only.
- };
CONTENT_EXPORT static TracingController* GetInstance();
@@ -64,10 +59,9 @@ class TracingController {
//
// |options| controls what kind of tracing is enabled.
typedef base::Callback<void()> EnableRecordingDoneCallback;
- virtual bool EnableRecording(
- const std::string& category_filter,
- TracingController::Options options,
- const EnableRecordingDoneCallback& callback) = 0;
+ virtual bool EnableRecording(const std::string& category_filter,
+ base::debug::TraceOptions trace_options,
+ const EnableRecordingDoneCallback& callback) = 0;
// Stop recording on all processes.
//
@@ -106,7 +100,7 @@ class TracingController {
typedef base::Callback<void()> EnableMonitoringDoneCallback;
virtual bool EnableMonitoring(
const std::string& category_filter,
- TracingController::Options options,
+ base::debug::TraceOptions trace_options,
const EnableMonitoringDoneCallback& callback) = 0;
// Stop monitoring on all processes.
@@ -118,9 +112,10 @@ class TracingController {
const DisableMonitoringDoneCallback& callback) = 0;
// Get the current monitoring configuration.
- virtual void GetMonitoringStatus(bool* out_enabled,
- std::string* out_category_filter,
- TracingController::Options* out_options) = 0;
+ virtual void GetMonitoringStatus(
+ bool* out_enabled,
+ std::string* out_category_filter,
+ base::debug::TraceOptions* out_trace_options) = 0;
// Get the current monitoring traced data.
//

Powered by Google App Engine
This is Rietveld 408576698