| 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 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 base::MessageLoop::current()->PostTask(FROM_HERE, | 131 base::MessageLoop::current()->PostTask(FROM_HERE, |
| 132 base::Bind(callback, true)); | 132 base::Bind(callback, true)); |
| 133 } | 133 } |
| 134 | 134 |
| 135 void FakeDebugDaemonClient::QueryDebuggingFeatures( | 135 void FakeDebugDaemonClient::QueryDebuggingFeatures( |
| 136 const DebugDaemonClient::QueryDevFeaturesCallback& callback) { | 136 const DebugDaemonClient::QueryDevFeaturesCallback& callback) { |
| 137 bool supported = base::CommandLine::ForCurrentProcess()->HasSwitch( | 137 bool supported = base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 138 chromeos::switches::kSystemDevMode); | 138 chromeos::switches::kSystemDevMode); |
| 139 base::MessageLoop::current()->PostTask( | 139 base::MessageLoop::current()->PostTask( |
| 140 FROM_HERE, | 140 FROM_HERE, |
| 141 base::Bind(callback, | 141 base::Bind( |
| 142 true, | 142 callback, true, |
| 143 static_cast<int>( | 143 static_cast<int>( |
| 144 supported ? featues_mask_ : | 144 supported ? featues_mask_ |
| 145 DebugDaemonClient::DEV_FEATURES_DISABLED))); | 145 : debugd::DevFeatureFlag::DEV_FEATURES_DISABLED))); |
| 146 } | 146 } |
| 147 | 147 |
| 148 void FakeDebugDaemonClient::RemoveRootfsVerification( | 148 void FakeDebugDaemonClient::RemoveRootfsVerification( |
| 149 const DebugDaemonClient::EnableDebuggingCallback& callback) { | 149 const DebugDaemonClient::EnableDebuggingCallback& callback) { |
| 150 base::MessageLoop::current()->PostTask(FROM_HERE, | 150 base::MessageLoop::current()->PostTask(FROM_HERE, |
| 151 base::Bind(callback, true)); | 151 base::Bind(callback, true)); |
| 152 } | 152 } |
| 153 | 153 |
| 154 void FakeDebugDaemonClient::WaitForServiceToBeAvailable( | 154 void FakeDebugDaemonClient::WaitForServiceToBeAvailable( |
| 155 const WaitForServiceToBeAvailableCallback& callback) { | 155 const WaitForServiceToBeAvailableCallback& callback) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 170 if (!is_available) | 170 if (!is_available) |
| 171 return; | 171 return; |
| 172 | 172 |
| 173 std::vector<WaitForServiceToBeAvailableCallback> callbacks; | 173 std::vector<WaitForServiceToBeAvailableCallback> callbacks; |
| 174 callbacks.swap(pending_wait_for_service_to_be_available_callbacks_); | 174 callbacks.swap(pending_wait_for_service_to_be_available_callbacks_); |
| 175 for (size_t i = 0; i < callbacks.size(); ++i) | 175 for (size_t i = 0; i < callbacks.size(); ++i) |
| 176 callbacks[i].Run(is_available); | 176 callbacks[i].Run(is_available); |
| 177 } | 177 } |
| 178 | 178 |
| 179 } // namespace chromeos | 179 } // namespace chromeos |
| OLD | NEW |