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

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

Issue 12491014: Support D-Bus Object Manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | dbus/bus.h » ('j') | dbus/object_manager.h » ('J')
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 <map> 7 #include <map>
8 8
9 #include "base/chromeos/chromeos_version.h" 9 #include "base/chromeos/chromeos_version.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 SMSClient::Create(client_type_, system_bus_.get())); 131 SMSClient::Create(client_type_, system_bus_.get()));
132 system_clock_client_.reset( 132 system_clock_client_.reset(
133 SystemClockClient::Create(client_type_, system_bus_.get())); 133 SystemClockClient::Create(client_type_, system_bus_.get()));
134 update_engine_client_.reset( 134 update_engine_client_.reset(
135 UpdateEngineClient::Create(client_type_, system_bus_.get())); 135 UpdateEngineClient::Create(client_type_, system_bus_.get()));
136 136
137 // PowerPolicyController is dependent on PowerManagerClient, so 137 // PowerPolicyController is dependent on PowerManagerClient, so
138 // initialize it after the main list of clients. 138 // initialize it after the main list of clients.
139 power_policy_controller_.reset( 139 power_policy_controller_.reset(
140 new PowerPolicyController(this, power_manager_client_.get())); 140 new PowerPolicyController(this, power_manager_client_.get()));
141
142 // This must be called after the list of clients so they've each had a
143 // chance to register with their object managers.
144 system_bus_->GetManagedObjects();
141 } 145 }
142 146
143 virtual ~DBusThreadManagerImpl() { 147 virtual ~DBusThreadManagerImpl() {
144 FOR_EACH_OBSERVER(DBusThreadManagerObserver, observers_, 148 FOR_EACH_OBSERVER(DBusThreadManagerObserver, observers_,
145 OnDBusThreadManagerDestroying(this)); 149 OnDBusThreadManagerDestroying(this));
146 150
147 // Shut down the bus. During the browser shutdown, it's ok to shut down 151 // Shut down the bus. During the browser shutdown, it's ok to shut down
148 // the bus synchronously. 152 // the bus synchronously.
149 system_bus_->ShutdownOnDBusThreadAndBlock(); 153 system_bus_->ShutdownOnDBusThreadAndBlock();
150 if (ibus_bus_.get()) 154 if (ibus_bus_.get())
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 } 482 }
479 483
480 // static 484 // static
481 DBusThreadManager* DBusThreadManager::Get() { 485 DBusThreadManager* DBusThreadManager::Get() {
482 CHECK(g_dbus_thread_manager) 486 CHECK(g_dbus_thread_manager)
483 << "DBusThreadManager::Get() called before Initialize()"; 487 << "DBusThreadManager::Get() called before Initialize()";
484 return g_dbus_thread_manager; 488 return g_dbus_thread_manager;
485 } 489 }
486 490
487 } // namespace chromeos 491 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | dbus/bus.h » ('j') | dbus/object_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698