| Index: content/public/browser/tracing_controller.h
|
| diff --git a/content/public/browser/tracing_controller.h b/content/public/browser/tracing_controller.h
|
| index d2aded98587bf70e03f921b360dd82edcd09be71..74aa8d63a43f57cfdff07db926f8324bb433a894 100644
|
| --- a/content/public/browser/tracing_controller.h
|
| +++ b/content/public/browser/tracing_controller.h
|
| @@ -6,8 +6,9 @@
|
| #define CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_
|
|
|
| #include <set>
|
| +#include <string>
|
|
|
| -#include "base/debug/trace_event.h"
|
| +#include "base/callback.h"
|
| #include "content/common/content_export.h"
|
|
|
| namespace base {
|
| @@ -25,6 +26,7 @@ class TracingController;
|
| class TracingController {
|
| public:
|
| enum Options {
|
| + DEFAULT_OPTIONS = 0,
|
| ENABLE_SYSTRACE = 1 << 0,
|
| ENABLE_SAMPLING = 1 << 1,
|
| RECORD_CONTINUOUSLY = 1 << 2, // For EnableRecording() only.
|
| @@ -51,8 +53,8 @@ class TracingController {
|
| // Once all child processes have acked to the EnableRecording request,
|
| // EnableRecordingDoneCallback will be called back.
|
| //
|
| - // |filter| is a filter to control what category groups should be traced.
|
| - // A filter can have an optional '-' prefix to exclude category groups
|
| + // |category_filter| is a filter to control what category groups should be
|
| + // traced. A filter can have an optional '-' prefix to exclude category groups
|
| // that contain a matching category. Having both included and excluded
|
| // category patterns in the same list would not be supported.
|
| //
|
| @@ -63,7 +65,7 @@ class TracingController {
|
| // |options| controls what kind of tracing is enabled.
|
| typedef base::Callback<void()> EnableRecordingDoneCallback;
|
| virtual bool EnableRecording(
|
| - const base::debug::CategoryFilter& filter,
|
| + const std::string& category_filter,
|
| TracingController::Options options,
|
| const EnableRecordingDoneCallback& callback) = 0;
|
|
|
| @@ -96,11 +98,13 @@ class TracingController {
|
| // Once all child processes have acked to the EnableMonitoring request,
|
| // EnableMonitoringDoneCallback will be called back.
|
| //
|
| - // |filter| is a filter to control what category groups should be traced.
|
| + // |category_filter| is a filter to control what category groups should be
|
| + // traced.
|
| //
|
| // |options| controls what kind of tracing is enabled.
|
| typedef base::Callback<void()> EnableMonitoringDoneCallback;
|
| - virtual bool EnableMonitoring(const base::debug::CategoryFilter& filter,
|
| + virtual bool EnableMonitoring(
|
| + const std::string& category_filter,
|
| TracingController::Options options,
|
| const EnableMonitoringDoneCallback& callback) = 0;
|
|
|
| @@ -114,8 +118,8 @@ class TracingController {
|
|
|
| // Get the current monitoring configuration.
|
| virtual void GetMonitoringStatus(bool* out_enabled,
|
| - base::debug::CategoryFilter* out_filter,
|
| - TracingController::Options* out_options) = 0;
|
| + std::string* out_category_filter,
|
| + TracingController::Options* out_options) = 0;
|
|
|
| // Get the current monitoring traced data.
|
| //
|
| @@ -145,6 +149,17 @@ class TracingController {
|
| virtual bool GetTraceBufferPercentFull(
|
| const GetTraceBufferPercentFullCallback& callback) = 0;
|
|
|
| + // |callback| will will be called every time the given event occurs on any
|
| + // process.
|
| + typedef base::Callback<void()> WatchEventCallback;
|
| + virtual bool SetWatchEvent(const std::string& category_name,
|
| + const std::string& event_name,
|
| + const WatchEventCallback& callback) = 0;
|
| +
|
| + // Cancel the watch event. If tracing is enabled, this may race with the
|
| + // watch event callback.
|
| + virtual bool CancelWatchEvent() = 0;
|
| +
|
| protected:
|
| virtual ~TracingController() {}
|
| };
|
|
|