OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chromeos/dbus/fake_debug_daemon_client.h" | 5 #include "chromeos/dbus/fake_debug_daemon_client.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 20 matching lines...) Expand all Loading... | |
31 base::File file, | 31 base::File file, |
32 scoped_refptr<base::TaskRunner> task_runner, | 32 scoped_refptr<base::TaskRunner> task_runner, |
33 const GetDebugLogsCallback& callback) { | 33 const GetDebugLogsCallback& callback) { |
34 callback.Run(true); | 34 callback.Run(true); |
35 } | 35 } |
36 | 36 |
37 void FakeDebugDaemonClient::SetDebugMode(const std::string& subsystem, | 37 void FakeDebugDaemonClient::SetDebugMode(const std::string& subsystem, |
38 const SetDebugModeCallback& callback) { | 38 const SetDebugModeCallback& callback) { |
39 callback.Run(false); | 39 callback.Run(false); |
40 } | 40 } |
41 void FakeDebugDaemonClient::StartSystemTracing() {} | |
42 | 41 |
43 bool FakeDebugDaemonClient::RequestStopSystemTracing( | 42 std::string FakeDebugDaemonClient::GetTracingAgentName() { |
44 scoped_refptr<base::TaskRunner> task_runner, | 43 return kCrOSTracingAgentName; |
45 const StopSystemTracingCallback& callback) { | 44 } |
45 | |
46 bool FakeDebugDaemonClient::StartAgentTracing( | |
47 const base::trace_event::TraceConfig& trace_config) { | |
48 return true; | |
49 } | |
50 | |
51 void FakeDebugDaemonClient::StopAgentTracing( | |
52 const StopAgentTracingCallback& callback) { | |
46 std::string no_data; | 53 std::string no_data; |
47 callback.Run(base::RefCountedString::TakeString(&no_data)); | 54 callback.Run(base::RefCountedString::TakeString(&no_data)); |
48 return true; | |
49 } | 55 } |
50 | 56 |
57 bool FakeDebugDaemonClient::SupportsExplicitClockSync() { | |
58 return false; | |
59 } | |
60 | |
61 void FakeDebugDaemonClient::RecordClockSyncMarker( | |
62 scoped_ptr<base::DictionaryValue> marker) { | |
63 DCHECK(SupportsExplicitClockSync()); | |
64 } | |
65 | |
66 void FakeDebugDaemonClient::IssueClockSyncMarker() { | |
oystein (OOO til 10th of July)
2015/11/24 22:52:10
The pattern of these three above functions seem to
Zhen Wang
2015/11/25 04:24:55
Done.
| |
67 DCHECK(SupportsExplicitClockSync()); | |
68 } | |
69 | |
70 void FakeDebugDaemonClient::SetStopAgentTracingTaskRunner( | |
71 scoped_refptr<base::TaskRunner> task_runner) {} | |
72 | |
51 void FakeDebugDaemonClient::GetRoutes(bool numeric, | 73 void FakeDebugDaemonClient::GetRoutes(bool numeric, |
52 bool ipv6, | 74 bool ipv6, |
53 const GetRoutesCallback& callback) { | 75 const GetRoutesCallback& callback) { |
54 std::vector<std::string> empty; | 76 std::vector<std::string> empty; |
55 base::ThreadTaskRunnerHandle::Get()->PostTask( | 77 base::ThreadTaskRunnerHandle::Get()->PostTask( |
56 FROM_HERE, base::Bind(callback, false, empty)); | 78 FROM_HERE, base::Bind(callback, false, empty)); |
57 } | 79 } |
58 | 80 |
59 void FakeDebugDaemonClient::GetNetworkStatus( | 81 void FakeDebugDaemonClient::GetNetworkStatus( |
60 const GetNetworkStatusCallback& callback) { | 82 const GetNetworkStatusCallback& callback) { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
175 if (!is_available) | 197 if (!is_available) |
176 return; | 198 return; |
177 | 199 |
178 std::vector<WaitForServiceToBeAvailableCallback> callbacks; | 200 std::vector<WaitForServiceToBeAvailableCallback> callbacks; |
179 callbacks.swap(pending_wait_for_service_to_be_available_callbacks_); | 201 callbacks.swap(pending_wait_for_service_to_be_available_callbacks_); |
180 for (size_t i = 0; i < callbacks.size(); ++i) | 202 for (size_t i = 0; i < callbacks.size(); ++i) |
181 callbacks[i].Run(is_available); | 203 callbacks[i].Run(is_available); |
182 } | 204 } |
183 | 205 |
184 } // namespace chromeos | 206 } // namespace chromeos |
OLD | NEW |