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

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

Issue 2954293002: Chromad: Prevent session from starting without policy (Closed)
Patch Set: Move MockAuthPolicyClient into unittest Created 3 years, 5 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/dbus_thread_manager.h ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_thread_manager.h" 5 #include "chromeos/dbus/dbus_thread_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 DBusThreadManager* DBusThreadManager::Get() { 302 DBusThreadManager* DBusThreadManager::Get() {
303 CHECK(g_dbus_thread_manager) 303 CHECK(g_dbus_thread_manager)
304 << "DBusThreadManager::Get() called before Initialize()"; 304 << "DBusThreadManager::Get() called before Initialize()";
305 return g_dbus_thread_manager; 305 return g_dbus_thread_manager;
306 } 306 }
307 307
308 DBusThreadManagerSetter::DBusThreadManagerSetter() {} 308 DBusThreadManagerSetter::DBusThreadManagerSetter() {}
309 309
310 DBusThreadManagerSetter::~DBusThreadManagerSetter() {} 310 DBusThreadManagerSetter::~DBusThreadManagerSetter() {}
311 311
312 void DBusThreadManagerSetter::SetAuthPolicyClient(
313 std::unique_ptr<AuthPolicyClient> client) {
314 DBusThreadManager::Get()->clients_browser_->auth_policy_client_ =
315 std::move(client);
316 }
317
312 void DBusThreadManagerSetter::SetBiodClient( 318 void DBusThreadManagerSetter::SetBiodClient(
313 std::unique_ptr<BiodClient> client) { 319 std::unique_ptr<BiodClient> client) {
314 DBusThreadManager::Get()->clients_common_->biod_client_ = std::move(client); 320 DBusThreadManager::Get()->clients_common_->biod_client_ = std::move(client);
315 } 321 }
316 322
317 void DBusThreadManagerSetter::SetCrasAudioClient( 323 void DBusThreadManagerSetter::SetCrasAudioClient(
318 std::unique_ptr<CrasAudioClient> client) { 324 std::unique_ptr<CrasAudioClient> client) {
319 DBusThreadManager::Get()->clients_common_->cras_audio_client_ = 325 DBusThreadManager::Get()->clients_common_->cras_audio_client_ =
320 std::move(client); 326 std::move(client);
321 } 327 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 std::move(client); 423 std::move(client);
418 } 424 }
419 425
420 void DBusThreadManagerSetter::SetUpstartClient( 426 void DBusThreadManagerSetter::SetUpstartClient(
421 std::unique_ptr<UpstartClient> client) { 427 std::unique_ptr<UpstartClient> client) {
422 DBusThreadManager::Get()->clients_browser_->upstart_client_ = 428 DBusThreadManager::Get()->clients_browser_->upstart_client_ =
423 std::move(client); 429 std::move(client);
424 } 430 }
425 431
426 } // namespace chromeos 432 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/dbus_thread_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698