Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chromeos/dbus/fake_arc_trace_agent.h" | |
| 6 | |
| 7 #include <string> | |
| 8 | |
| 9 #include "base/single_thread_task_runner.h" | |
| 10 #include "base/threading/thread_task_runner_handle.h" | |
| 11 | |
| 12 namespace chromeos { | |
| 13 | |
| 14 namespace { | |
| 15 | |
| 16 constexpr char kArcTracingAgentName[] = "arc"; | |
| 17 constexpr char kArcTraceLabel[] = "ArcTraceEvents"; | |
| 18 | |
| 19 } // namespace | |
| 20 | |
| 21 void FakeArcTraceAgent::SetDelegate(Delegate* delegate) {} | |
| 22 | |
| 23 void FakeArcTraceAgent::SetStopAgentTracingTaskRunner( | |
| 24 scoped_refptr<base::TaskRunner> task_runner) {} | |
| 25 | |
| 26 std::string FakeArcTraceAgent::GetTracingAgentName() { | |
| 27 return kArcTracingAgentName; | |
| 28 } | |
| 29 | |
| 30 std::string FakeArcTraceAgent::GetTraceEventLabel() { | |
| 31 return kArcTraceLabel; | |
| 32 } | |
| 33 | |
| 34 void FakeArcTraceAgent::StartAgentTracing( | |
| 35 const base::trace_event::TraceConfig& trace_config, | |
| 36 const StartAgentTracingCallback& callback) { | |
| 37 base::ThreadTaskRunnerHandle::Get()->PostTask( | |
|
Luis Héctor Chávez
2016/12/28 17:21:58
callback.Run(GetTracingAgentName(), true /* succes
shunhsingou
2016/12/29 09:40:29
Added a comment here.
I think this is something n
| |
| 38 FROM_HERE, | |
| 39 base::Bind(callback, GetTracingAgentName(), true /* success */)); | |
| 40 } | |
| 41 | |
| 42 void FakeArcTraceAgent::StopAgentTracing( | |
| 43 const StopAgentTracingCallback& callback) { | |
| 44 std::string no_data; | |
| 45 callback.Run(GetTracingAgentName(), GetTraceEventLabel(), | |
| 46 base::RefCountedString::TakeString(&no_data)); | |
| 47 } | |
| 48 | |
| 49 void FakeArcTraceAgent::Init(dbus::Bus* bus) {} | |
| 50 | |
| 51 } // namespace chromeos | |
| OLD | NEW |