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

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

Issue 497453003: Fix wrong constants are used for unstabbing D-Bus clients (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/dbus_client_bundle.h" 5 #include "chromeos/dbus/dbus_client_bundle.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "chromeos/chromeos_switches.h" 10 #include "chromeos/chromeos_switches.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 nfc_tag_client_.reset(new FakeNfcTagClient); 239 nfc_tag_client_.reset(new FakeNfcTagClient);
240 nfc_record_client_.reset(new FakeNfcRecordClient); 240 nfc_record_client_.reset(new FakeNfcRecordClient);
241 } 241 }
242 242
243 if (!DBusThreadManager::IsUsingStub(PERMISSION_BROKER)) 243 if (!DBusThreadManager::IsUsingStub(PERMISSION_BROKER))
244 permission_broker_client_.reset(PermissionBrokerClient::Create()); 244 permission_broker_client_.reset(PermissionBrokerClient::Create());
245 else 245 else
246 permission_broker_client_.reset(new FakePermissionBrokerClient); 246 permission_broker_client_.reset(new FakePermissionBrokerClient);
247 247
248 power_manager_client_.reset(PowerManagerClient::Create( 248 power_manager_client_.reset(PowerManagerClient::Create(
249 DBusThreadManager::IsUsingStub(CROS_DISKS) ? 249 DBusThreadManager::IsUsingStub(POWER_MANAGER) ?
250 STUB_DBUS_CLIENT_IMPLEMENTATION : 250 STUB_DBUS_CLIENT_IMPLEMENTATION :
251 REAL_DBUS_CLIENT_IMPLEMENTATION)); 251 REAL_DBUS_CLIENT_IMPLEMENTATION));
252 252
253 session_manager_client_.reset(SessionManagerClient::Create( 253 session_manager_client_.reset(SessionManagerClient::Create(
254 DBusThreadManager::IsUsingStub(CROS_DISKS) ? 254 DBusThreadManager::IsUsingStub(SESSION_MANAGER) ?
255 STUB_DBUS_CLIENT_IMPLEMENTATION : 255 STUB_DBUS_CLIENT_IMPLEMENTATION :
256 REAL_DBUS_CLIENT_IMPLEMENTATION)); 256 REAL_DBUS_CLIENT_IMPLEMENTATION));
257 257
258 if (!DBusThreadManager::IsUsingStub(SMS)) 258 if (!DBusThreadManager::IsUsingStub(SMS))
259 sms_client_.reset(SMSClient::Create()); 259 sms_client_.reset(SMSClient::Create());
260 else 260 else
261 sms_client_.reset(new FakeSMSClient); 261 sms_client_.reset(new FakeSMSClient);
262 262
263 if (!DBusThreadManager::IsUsingStub(SYSTEM_CLOCK)) 263 if (!DBusThreadManager::IsUsingStub(SYSTEM_CLOCK))
264 system_clock_client_.reset(SystemClockClient::Create()); 264 system_clock_client_.reset(SystemClockClient::Create());
265 else 265 else
266 system_clock_client_.reset(new FakeSystemClockClient); 266 system_clock_client_.reset(new FakeSystemClockClient);
267 267
268 update_engine_client_.reset(UpdateEngineClient::Create( 268 update_engine_client_.reset(UpdateEngineClient::Create(
269 DBusThreadManager::IsUsingStub(CROS_DISKS) ? 269 DBusThreadManager::IsUsingStub(UPDATE_ENGINE) ?
270 STUB_DBUS_CLIENT_IMPLEMENTATION : 270 STUB_DBUS_CLIENT_IMPLEMENTATION :
271 REAL_DBUS_CLIENT_IMPLEMENTATION)); 271 REAL_DBUS_CLIENT_IMPLEMENTATION));
272 } 272 }
273 273
274 DBusClientBundle::~DBusClientBundle() { 274 DBusClientBundle::~DBusClientBundle() {
275 } 275 }
276 276
277 void DBusClientBundle::SetupDefaultEnvironment() { 277 void DBusClientBundle::SetupDefaultEnvironment() {
278 ShillManagerClient::TestInterface* manager = 278 ShillManagerClient::TestInterface* manager =
279 shill_manager_client_->GetTestInterface(); 279 shill_manager_client_->GetTestInterface();
(...skipping 16 matching lines...) Expand all
296 unstub_mask |= client; 296 unstub_mask |= client;
297 } else { 297 } else {
298 LOG(ERROR) << "Unknown dbus client: " << *iter; 298 LOG(ERROR) << "Unknown dbus client: " << *iter;
299 } 299 }
300 } 300 }
301 301
302 return unstub_mask; 302 return unstub_mask;
303 } 303 }
304 304
305 } // namespace chromeos 305 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698