diff options
author | zhenw <zhenw@chromium.org> | 2015-12-15 10:07:27 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-15 18:09:10 +0000 |
commit | b0b2a7f0fd7f6ec4a43f735e643a1f2f90351dc8 (patch) | |
tree | 83231e1910f5fbec30b9306a98f13083e5cae6c2 /chromeos/dbus/debug_daemon_client.h | |
parent | a3b91bd3cff4e98ec20bfbf79d37438c6f561e45 (diff) | |
download | chromium_src-b0b2a7f0fd7f6ec4a43f735e643a1f2f90351dc8.zip chromium_src-b0b2a7f0fd7f6ec4a43f735e643a1f2f90351dc8.tar.gz chromium_src-b0b2a7f0fd7f6ec4a43f735e643a1f2f90351dc8.tar.bz2 |
[Tracing Clock Sync] Add TracingAgent interface in Chrome
This CL adds TracingAgent interface in Chrome and hooks up
corresponding subclasses.
Design doc: https://goo.gl/8Vy6qX
BUG=542390
Review URL: https://codereview.chromium.org/1468173003
Cr-Commit-Position: refs/heads/master@{#365284}
Diffstat (limited to 'chromeos/dbus/debug_daemon_client.h')
-rw-r--r-- | chromeos/dbus/debug_daemon_client.h | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/chromeos/dbus/debug_daemon_client.h b/chromeos/dbus/debug_daemon_client.h index 86427a2..a11d6ec 100644 --- a/chromeos/dbus/debug_daemon_client.h +++ b/chromeos/dbus/debug_daemon_client.h @@ -11,6 +11,7 @@ #include "base/files/file.h" #include "base/memory/ref_counted_memory.h" #include "base/task_runner.h" +#include "base/trace_event/tracing_agent.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" #include "third_party/cros_system_api/dbus/service_constants.h" @@ -18,7 +19,9 @@ namespace chromeos { // DebugDaemonClient is used to communicate with the debug daemon. -class CHROMEOS_EXPORT DebugDaemonClient : public DBusClient { +class CHROMEOS_EXPORT DebugDaemonClient + : public DBusClient, + public base::trace_event::TracingAgent { public: ~DebugDaemonClient() override; @@ -113,21 +116,11 @@ class CHROMEOS_EXPORT DebugDaemonClient : public DBusClient { // Gets list of user log files that must be read by Chrome. virtual void GetUserLogFiles(const GetLogsCallback& callback) = 0; - // Requests to start system/kernel tracing. - virtual void StartSystemTracing() = 0; + virtual void SetStopAgentTracingTaskRunner( + scoped_refptr<base::TaskRunner> task_runner) = 0; - // Called once RequestStopSystemTracing() is complete. Takes one parameter: - // - result: the data collected while tracing was active - typedef base::Callback<void(const scoped_refptr<base::RefCountedString>& - result)> StopSystemTracingCallback; - - // Requests to stop system tracing and calls |callback| when completed. - virtual bool RequestStopSystemTracing( - scoped_refptr<base::TaskRunner> task_runner, - const StopSystemTracingCallback& callback) = 0; - - // Returns an empty SystemTracingCallback that does nothing. - static StopSystemTracingCallback EmptyStopSystemTracingCallback(); + // Returns an empty StopAgentTracingCallback that does nothing. + static StopAgentTracingCallback EmptyStopAgentTracingCallback(); // Called once TestICMP() is complete. Takes two parameters: // - succeeded: information was obtained successfully. |