| OLD | NEW |
| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 } | 332 } |
| 333 | 333 |
| 334 return base::WrapUnique(new DBusThreadManagerSetter()); | 334 return base::WrapUnique(new DBusThreadManagerSetter()); |
| 335 } | 335 } |
| 336 | 336 |
| 337 // static | 337 // static |
| 338 void DBusThreadManager::CreateGlobalInstance( | 338 void DBusThreadManager::CreateGlobalInstance( |
| 339 DBusClientBundle::DBusClientTypeMask unstub_client_mask) { | 339 DBusClientBundle::DBusClientTypeMask unstub_client_mask) { |
| 340 CHECK(!g_dbus_thread_manager); | 340 CHECK(!g_dbus_thread_manager); |
| 341 g_dbus_thread_manager = new DBusThreadManager( | 341 g_dbus_thread_manager = new DBusThreadManager( |
| 342 base::WrapUnique(new DBusClientBundle(unstub_client_mask))); | 342 base::MakeUnique<DBusClientBundle>(unstub_client_mask)); |
| 343 g_dbus_thread_manager->InitializeClients(); | 343 g_dbus_thread_manager->InitializeClients(); |
| 344 } | 344 } |
| 345 | 345 |
| 346 // static | 346 // static |
| 347 void DBusThreadManager::InitializeWithRealClients() { | 347 void DBusThreadManager::InitializeWithRealClients() { |
| 348 CreateGlobalInstance(~static_cast<DBusClientBundle::DBusClientTypeMask>(0)); | 348 CreateGlobalInstance(~static_cast<DBusClientBundle::DBusClientTypeMask>(0)); |
| 349 VLOG(1) << "DBusThreadManager initialized for Chrome OS"; | 349 VLOG(1) << "DBusThreadManager initialized for Chrome OS"; |
| 350 } | 350 } |
| 351 | 351 |
| 352 // static | 352 // static |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 std::move(client); | 574 std::move(client); |
| 575 } | 575 } |
| 576 | 576 |
| 577 void DBusThreadManagerSetter::SetUpdateEngineClient( | 577 void DBusThreadManagerSetter::SetUpdateEngineClient( |
| 578 std::unique_ptr<UpdateEngineClient> client) { | 578 std::unique_ptr<UpdateEngineClient> client) { |
| 579 DBusThreadManager::Get()->client_bundle_->update_engine_client_ = | 579 DBusThreadManager::Get()->client_bundle_->update_engine_client_ = |
| 580 std::move(client); | 580 std::move(client); |
| 581 } | 581 } |
| 582 | 582 |
| 583 } // namespace chromeos | 583 } // namespace chromeos |
| OLD | NEW |