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

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: Address joechan's comments Created 6 years, 4 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..67a28cd919f7b03291006b128946cf56a332d9b1 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();
@@ -65,8 +60,8 @@ 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 base::debug::CategoryFilter& category_filter,
+ const base::debug::TraceOptions& trace_options,
const EnableRecordingDoneCallback& callback) = 0;
// Stop recording on all processes.
@@ -105,8 +100,8 @@ class TracingController {
// |options| controls what kind of tracing is enabled.
typedef base::Callback<void()> EnableMonitoringDoneCallback;
virtual bool EnableMonitoring(
- const std::string& category_filter,
- TracingController::Options options,
+ const base::debug::CategoryFilter& category_filter,
+ const base::debug::TraceOptions& trace_options,
const EnableMonitoringDoneCallback& callback) = 0;
// Stop monitoring on all processes.
@@ -118,9 +113,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,
+ base::debug::CategoryFilter* 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