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 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/command_line.h" | |
11 #include "base/bind.h" | 12 #include "base/bind.h" |
12 #include "base/callback.h" | 13 #include "base/callback.h" |
13 #include "base/location.h" | 14 #include "base/location.h" |
14 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
16 #include "chromeos/chromeos_switches.h" | |
15 | 17 |
16 namespace chromeos { | 18 namespace chromeos { |
17 | 19 |
18 FakeDebugDaemonClient::FakeDebugDaemonClient() {} | 20 FakeDebugDaemonClient::FakeDebugDaemonClient() {} |
19 | 21 |
20 FakeDebugDaemonClient::~FakeDebugDaemonClient() {} | 22 FakeDebugDaemonClient::~FakeDebugDaemonClient() {} |
21 | 23 |
22 void FakeDebugDaemonClient::Init(dbus::Bus* bus) {} | 24 void FakeDebugDaemonClient::Init(dbus::Bus* bus) {} |
23 | 25 |
24 void FakeDebugDaemonClient::DumpDebugLogs( | 26 void FakeDebugDaemonClient::DumpDebugLogs( |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
113 const std::string& ip_address, | 115 const std::string& ip_address, |
114 const std::map<std::string, std::string>& options, | 116 const std::map<std::string, std::string>& options, |
115 const TestICMPCallback& callback) { | 117 const TestICMPCallback& callback) { |
116 base::MessageLoop::current()->PostTask(FROM_HERE, | 118 base::MessageLoop::current()->PostTask(FROM_HERE, |
117 base::Bind(callback, false, "")); | 119 base::Bind(callback, false, "")); |
118 } | 120 } |
119 | 121 |
120 void FakeDebugDaemonClient::UploadCrashes() { | 122 void FakeDebugDaemonClient::UploadCrashes() { |
121 } | 123 } |
122 | 124 |
125 void FakeDebugDaemonClient::EnableDebuggingFeatures( | |
126 const std::string& password, | |
127 const DebugDaemonClient::EnableDebuggingCallback& callback) { | |
128 base::MessageLoop::current()->PostTask(FROM_HERE, | |
129 base::Bind(callback, true)); | |
130 } | |
131 | |
132 void FakeDebugDaemonClient::QueryDebuggingFeatures( | |
133 const DebugDaemonClient::QueryDevFeaturesCallback& callback) { | |
134 bool supported = base::CommandLine::ForCurrentProcess()->HasSwitch( | |
135 chromeos::switches::kSystemDevMode); | |
136 base::MessageLoop::current()->PostTask( | |
137 FROM_HERE, | |
138 base::Bind(callback, | |
139 true, | |
140 static_cast<int>( | |
141 supported ? DebugDaemonClient::DEV_FEATURE_ROOTFS_VERIFICAT ION_REMOVED : | |
xiyuan
2014/10/31 03:36:01
nit: line too long.
zel
2014/10/31 23:23:43
Done.
| |
142 DebugDaemonClient::DEV_FEATURES_DISABLED))); | |
143 } | |
144 | |
145 void FakeDebugDaemonClient::RemoveRootfsVerification( | |
146 const DebugDaemonClient::EnableDebuggingCallback& callback) { | |
147 base::MessageLoop::current()->PostTask(FROM_HERE, | |
148 base::Bind(callback, true)); | |
149 } | |
150 | |
123 } // namespace chromeos | 151 } // namespace chromeos |
OLD | NEW |