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

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

Issue 2475343002: Add UpstartClient (Closed)
Patch Set: Created UpstartClient and moved StartService there 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
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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 } 198 }
199 199
200 SystemClockClient* DBusThreadManager::GetSystemClockClient() { 200 SystemClockClient* DBusThreadManager::GetSystemClockClient() {
201 return clients_common_->system_clock_client_.get(); 201 return clients_common_->system_clock_client_.get();
202 } 202 }
203 203
204 UpdateEngineClient* DBusThreadManager::GetUpdateEngineClient() { 204 UpdateEngineClient* DBusThreadManager::GetUpdateEngineClient() {
205 return clients_common_->update_engine_client_.get(); 205 return clients_common_->update_engine_client_.get();
206 } 206 }
207 207
208 UpstartClient* DBusThreadManager::GetUpstartClient() {
209 return clients_browser_ ? clients_browser_->upstart_client_.get() : nullptr;
210 }
211
208 void DBusThreadManager::InitializeClients() { 212 void DBusThreadManager::InitializeClients() {
209 // Some clients call DBusThreadManager::Get() during initialization. 213 // Some clients call DBusThreadManager::Get() during initialization.
210 DCHECK(g_dbus_thread_manager); 214 DCHECK(g_dbus_thread_manager);
211 215
212 clients_common_->Initialize(GetSystemBus()); 216 clients_common_->Initialize(GetSystemBus());
213 if (clients_browser_) 217 if (clients_browser_)
214 clients_browser_->Initialize(GetSystemBus()); 218 clients_browser_->Initialize(GetSystemBus());
215 219
216 if (use_real_clients_) 220 if (use_real_clients_)
217 VLOG(1) << "DBusThreadManager initialized for Chrome OS"; 221 VLOG(1) << "DBusThreadManager initialized for Chrome OS";
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 std::move(client); 374 std::move(client);
371 } 375 }
372 376
373 void DBusThreadManagerSetter::SetUpdateEngineClient( 377 void DBusThreadManagerSetter::SetUpdateEngineClient(
374 std::unique_ptr<UpdateEngineClient> client) { 378 std::unique_ptr<UpdateEngineClient> client) {
375 DBusThreadManager::Get()->clients_common_->update_engine_client_ = 379 DBusThreadManager::Get()->clients_common_->update_engine_client_ =
376 std::move(client); 380 std::move(client);
377 } 381 }
378 382
379 } // namespace chromeos 383 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698