Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Side by Side Diff: chromeos/dbus/fake_debug_daemon_client.cc

Issue 925903006: Refactor debug_daemon_client.h to use debugd::DevFeatureFlag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chromeos/dbus/debug_daemon_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chromeos/dbus/debug_daemon_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698