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

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

Issue 2475343002: Add UpstartClient (Closed)
Patch Set: Rebase Created 4 years, 1 month 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') | chromeos/dbus/fake_upstart_client.h » ('j') | 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 204 }
205 205
206 SystemClockClient* DBusThreadManager::GetSystemClockClient() { 206 SystemClockClient* DBusThreadManager::GetSystemClockClient() {
207 return clients_common_->system_clock_client_.get(); 207 return clients_common_->system_clock_client_.get();
208 } 208 }
209 209
210 UpdateEngineClient* DBusThreadManager::GetUpdateEngineClient() { 210 UpdateEngineClient* DBusThreadManager::GetUpdateEngineClient() {
211 return clients_common_->update_engine_client_.get(); 211 return clients_common_->update_engine_client_.get();
212 } 212 }
213 213
214 UpstartClient* DBusThreadManager::GetUpstartClient() {
215 return clients_browser_ ? clients_browser_->upstart_client_.get() : nullptr;
216 }
217
214 void DBusThreadManager::InitializeClients() { 218 void DBusThreadManager::InitializeClients() {
215 // Some clients call DBusThreadManager::Get() during initialization. 219 // Some clients call DBusThreadManager::Get() during initialization.
216 DCHECK(g_dbus_thread_manager); 220 DCHECK(g_dbus_thread_manager);
217 221
218 clients_common_->Initialize(GetSystemBus()); 222 clients_common_->Initialize(GetSystemBus());
219 if (clients_browser_) 223 if (clients_browser_)
220 clients_browser_->Initialize(GetSystemBus()); 224 clients_browser_->Initialize(GetSystemBus());
221 225
222 if (use_real_clients_) 226 if (use_real_clients_)
223 VLOG(1) << "DBusThreadManager initialized for Chrome OS"; 227 VLOG(1) << "DBusThreadManager initialized for Chrome OS";
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 std::move(client); 387 std::move(client);
384 } 388 }
385 389
386 void DBusThreadManagerSetter::SetUpdateEngineClient( 390 void DBusThreadManagerSetter::SetUpdateEngineClient(
387 std::unique_ptr<UpdateEngineClient> client) { 391 std::unique_ptr<UpdateEngineClient> client) {
388 DBusThreadManager::Get()->clients_common_->update_engine_client_ = 392 DBusThreadManager::Get()->clients_common_->update_engine_client_ =
389 std::move(client); 393 std::move(client);
390 } 394 }
391 395
392 } // namespace chromeos 396 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/dbus_thread_manager.h ('k') | chromeos/dbus/fake_upstart_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698