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

Unified Diff: chromeos/dbus/fake_debug_daemon_client.cc

Issue 1468173003: [Tracing Clock Sync] Add TracingAgent interface in Chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review fix Created 5 years 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
« no previous file with comments | « chromeos/dbus/fake_debug_daemon_client.h ('k') | content/browser/tracing/etw_system_event_consumer_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/fake_debug_daemon_client.cc
diff --git a/chromeos/dbus/fake_debug_daemon_client.cc b/chromeos/dbus/fake_debug_daemon_client.cc
index 8dd391cdbb9d549a81a4ee2f29b5a01a9a8763d9..bdfa7aacf2adc072b88f77eb7f162bdb525e4b31 100644
--- a/chromeos/dbus/fake_debug_daemon_client.cc
+++ b/chromeos/dbus/fake_debug_daemon_client.cc
@@ -15,6 +15,13 @@
#include "base/thread_task_runner_handle.h"
#include "chromeos/chromeos_switches.h"
+namespace {
+
+const char kCrOSTracingAgentName[] = "cros";
+const char kCrOSTraceLabel[] = "systemTraceEvents";
+
+} // namespace
+
namespace chromeos {
FakeDebugDaemonClient::FakeDebugDaemonClient()
@@ -38,16 +45,30 @@ void FakeDebugDaemonClient::SetDebugMode(const std::string& subsystem,
const SetDebugModeCallback& callback) {
callback.Run(false);
}
-void FakeDebugDaemonClient::StartSystemTracing() {}
-bool FakeDebugDaemonClient::RequestStopSystemTracing(
- scoped_refptr<base::TaskRunner> task_runner,
- const StopSystemTracingCallback& callback) {
- std::string no_data;
- callback.Run(base::RefCountedString::TakeString(&no_data));
+std::string FakeDebugDaemonClient::GetTracingAgentName() {
+ return kCrOSTracingAgentName;
+}
+
+std::string FakeDebugDaemonClient::GetTraceEventLabel() {
+ return kCrOSTraceLabel;
+}
+
+bool FakeDebugDaemonClient::StartAgentTracing(
+ const base::trace_event::TraceConfig& trace_config) {
return true;
}
+void FakeDebugDaemonClient::StopAgentTracing(
+ const StopAgentTracingCallback& callback) {
+ std::string no_data;
+ callback.Run(GetTracingAgentName(), GetTraceEventLabel(),
+ base::RefCountedString::TakeString(&no_data));
+}
+
+void FakeDebugDaemonClient::SetStopAgentTracingTaskRunner(
+ scoped_refptr<base::TaskRunner> task_runner) {}
+
void FakeDebugDaemonClient::GetRoutes(bool numeric,
bool ipv6,
const GetRoutesCallback& callback) {
« no previous file with comments | « chromeos/dbus/fake_debug_daemon_client.h ('k') | content/browser/tracing/etw_system_event_consumer_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698