summaryrefslogtreecommitdiffstats
path: root/content/public/browser/tracing_controller.h
diff options
context:
space:
mode:
authortonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-27 00:47:55 +0000
committertonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-27 00:47:55 +0000
commit6aa58b8599840160df945afa89e7482d14d1c4d4 (patch)
tree7da568401c9497ac63894493ca5dd2e68230e35f /content/public/browser/tracing_controller.h
parent7b05498220a28e7a351c28e75ce1dc68abc746f3 (diff)
downloadchromium_src-6aa58b8599840160df945afa89e7482d14d1c4d4.zip
chromium_src-6aa58b8599840160df945afa89e7482d14d1c4d4.tar.gz
chromium_src-6aa58b8599840160df945afa89e7482d14d1c4d4.tar.bz2
Revert 237280 "Remove TraceController"
Seems to have broken trace-based telemetry benchmarks on android. BUG=323749 > Remove TraceController > > TraceController is obsoleted by TracingController. > Changed all remaining clients to use TracingController. > > BUG=none > > Review URL: https://codereview.chromium.org/67683003 TBR=wangxianzhu@chromium.org Review URL: https://codereview.chromium.org/89753004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237452 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public/browser/tracing_controller.h')
-rw-r--r--content/public/browser/tracing_controller.h35
1 files changed, 10 insertions, 25 deletions
diff --git a/content/public/browser/tracing_controller.h b/content/public/browser/tracing_controller.h
index 68184a5..ae46199 100644
--- a/content/public/browser/tracing_controller.h
+++ b/content/public/browser/tracing_controller.h
@@ -6,9 +6,8 @@
#define CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_
#include <set>
-#include <string>
-#include "base/callback.h"
+#include "base/debug/trace_event.h"
#include "content/common/content_export.h"
namespace base {
@@ -26,7 +25,6 @@ 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.
@@ -42,7 +40,7 @@ class TracingController {
// groups.
typedef base::Callback<void(const std::set<std::string>&)>
GetCategoriesDoneCallback;
- virtual bool GetCategories(
+ virtual void GetCategories(
const GetCategoriesDoneCallback& callback) = 0;
// Start recording on all processes.
@@ -53,8 +51,8 @@ class TracingController {
// Once all child processes have acked to the EnableRecording request,
// EnableRecordingDoneCallback will be called back.
//
- // |category_filter| is a filter to control what category groups should be
- // traced. A filter can have an optional '-' prefix to exclude category groups
+ // |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.
//
@@ -65,7 +63,7 @@ class TracingController {
// |options| controls what kind of tracing is enabled.
typedef base::Callback<void()> EnableRecordingDoneCallback;
virtual bool EnableRecording(
- const std::string& category_filter,
+ const base::debug::CategoryFilter& filter,
TracingController::Options options,
const EnableRecordingDoneCallback& callback) = 0;
@@ -99,13 +97,11 @@ class TracingController {
// Once all child processes have acked to the EnableMonitoring request,
// EnableMonitoringDoneCallback will be called back.
//
- // |category_filter| is a filter to control what category groups should be
- // traced.
+ // |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 std::string& category_filter,
+ virtual bool EnableMonitoring(const base::debug::CategoryFilter& filter,
TracingController::Options options,
const EnableMonitoringDoneCallback& callback) = 0;
@@ -119,8 +115,8 @@ class TracingController {
// Get the current monitoring configuration.
virtual void GetMonitoringStatus(bool* out_enabled,
- std::string* out_category_filter,
- TracingController::Options* out_options) = 0;
+ base::debug::CategoryFilter* out_filter,
+ TracingController::Options* out_options) = 0;
// Get the current monitoring traced data.
//
@@ -139,7 +135,7 @@ class TracingController {
//
// If |result_file_path| is empty and |callback| is null, trace data won't be
// written to any file.
- virtual bool CaptureMonitoringSnapshot(
+ virtual void CaptureMonitoringSnapshot(
const base::FilePath& result_file_path,
const TracingFileResultCallback& callback) = 0;
@@ -150,17 +146,6 @@ 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() {}
};