Chromium Code Reviews| 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) {} |
|
stevenjb
2015/12/14 18:22:40
optional: For better testing we might want to stor
Zhen Wang
2015/12/14 21:03:57
Acknowledged.
Maybe I should leave it to CrOS fol
|
| + |
| void FakeDebugDaemonClient::GetRoutes(bool numeric, |
| bool ipv6, |
| const GetRoutesCallback& callback) { |