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

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 2741803005: Split LivenessService out from LibCrosService. (Closed)
Patch Set: Add blank line above liveness_service_ Created 3 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
« no previous file with comments | « no previous file | chromeos/dbus/services/liveness_service_provider.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/chromeos/chrome_browser_main_chromeos.h" 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 231
232 CrosDBusService::ServiceProviderList service_providers; 232 CrosDBusService::ServiceProviderList service_providers;
233 service_providers.push_back( 233 service_providers.push_back(
234 base::WrapUnique(ProxyResolutionServiceProvider::Create( 234 base::WrapUnique(ProxyResolutionServiceProvider::Create(
235 base::MakeUnique<ChromeProxyResolverDelegate>()))); 235 base::MakeUnique<ChromeProxyResolverDelegate>())));
236 if (!ash_util::IsRunningInMash()) { 236 if (!ash_util::IsRunningInMash()) {
237 // TODO(crbug.com/629707): revisit this with mustash dbus work. 237 // TODO(crbug.com/629707): revisit this with mustash dbus work.
238 service_providers.push_back(base::MakeUnique<DisplayPowerServiceProvider>( 238 service_providers.push_back(base::MakeUnique<DisplayPowerServiceProvider>(
239 base::MakeUnique<ChromeDisplayPowerServiceProviderDelegate>())); 239 base::MakeUnique<ChromeDisplayPowerServiceProviderDelegate>()));
240 } 240 }
241 service_providers.push_back(base::MakeUnique<LivenessServiceProvider>()); 241 // TODO(teravest): Remove this service provider once clients use
242 // LivenessService instead of LibCrosService.
243 service_providers.push_back(
244 base::MakeUnique<LivenessServiceProvider>(kLibCrosServiceInterface));
242 service_providers.push_back(base::MakeUnique<ScreenLockServiceProvider>()); 245 service_providers.push_back(base::MakeUnique<ScreenLockServiceProvider>());
243 if (ash_util::IsRunningInMash()) { 246 if (ash_util::IsRunningInMash()) {
244 service_providers.push_back(base::MakeUnique<ConsoleServiceProvider>( 247 service_providers.push_back(base::MakeUnique<ConsoleServiceProvider>(
245 base::MakeUnique<MusConsoleServiceProviderDelegate>())); 248 base::MakeUnique<MusConsoleServiceProviderDelegate>()));
246 } else { 249 } else {
247 service_providers.push_back(base::MakeUnique<ConsoleServiceProvider>( 250 service_providers.push_back(base::MakeUnique<ConsoleServiceProvider>(
248 base::MakeUnique<ChromeConsoleServiceProviderDelegate>())); 251 base::MakeUnique<ChromeConsoleServiceProviderDelegate>()));
249 } 252 }
250 service_providers.push_back(base::MakeUnique<KioskInfoService>()); 253 service_providers.push_back(base::MakeUnique<KioskInfoService>());
251 cros_dbus_service_ = CrosDBusService::Create( 254 cros_dbus_service_ = CrosDBusService::Create(
252 kLibCrosServiceName, dbus::ObjectPath(kLibCrosServicePath), 255 kLibCrosServiceName, dbus::ObjectPath(kLibCrosServicePath),
253 std::move(service_providers)); 256 std::move(service_providers));
254 257
258 CrosDBusService::ServiceProviderList liveness_service_providers;
259 liveness_service_providers.push_back(
260 base::MakeUnique<LivenessServiceProvider>(kLivenessServiceInterface));
261 liveness_service_ = CrosDBusService::Create(
262 kLivenessServiceName, dbus::ObjectPath(kLivenessServicePath),
263 std::move(liveness_service_providers));
264
255 // Initialize PowerDataCollector after DBusThreadManager is initialized. 265 // Initialize PowerDataCollector after DBusThreadManager is initialized.
256 PowerDataCollector::Initialize(); 266 PowerDataCollector::Initialize();
257 267
258 LoginState::Initialize(); 268 LoginState::Initialize();
259 SystemSaltGetter::Initialize(); 269 SystemSaltGetter::Initialize();
260 TPMTokenLoader::Initialize(); 270 TPMTokenLoader::Initialize();
261 CertLoader::Initialize(); 271 CertLoader::Initialize();
262 272
263 disks::DiskMountManager::Initialize(); 273 disks::DiskMountManager::Initialize();
264 cryptohome::AsyncMethodCaller::Initialize(); 274 cryptohome::AsyncMethodCaller::Initialize();
(...skipping 29 matching lines...) Expand all
294 network_connect_delegate_.reset(); 304 network_connect_delegate_.reset();
295 CertLibrary::Shutdown(); 305 CertLibrary::Shutdown();
296 NetworkHandler::Shutdown(); 306 NetworkHandler::Shutdown();
297 cryptohome::AsyncMethodCaller::Shutdown(); 307 cryptohome::AsyncMethodCaller::Shutdown();
298 disks::DiskMountManager::Shutdown(); 308 disks::DiskMountManager::Shutdown();
299 SystemSaltGetter::Shutdown(); 309 SystemSaltGetter::Shutdown();
300 LoginState::Shutdown(); 310 LoginState::Shutdown();
301 CertLoader::Shutdown(); 311 CertLoader::Shutdown();
302 TPMTokenLoader::Shutdown(); 312 TPMTokenLoader::Shutdown();
303 cros_dbus_service_.reset(); 313 cros_dbus_service_.reset();
314 liveness_service_.reset();
304 PowerDataCollector::Shutdown(); 315 PowerDataCollector::Shutdown();
305 PowerPolicyController::Shutdown(); 316 PowerPolicyController::Shutdown();
306 device::BluetoothAdapterFactory::Shutdown(); 317 device::BluetoothAdapterFactory::Shutdown();
307 bluez::BluezDBusManager::Shutdown(); 318 bluez::BluezDBusManager::Shutdown();
308 319
309 // NOTE: This must only be called if Initialize() was called. 320 // NOTE: This must only be called if Initialize() was called.
310 DBusThreadManager::Shutdown(); 321 DBusThreadManager::Shutdown();
311 } 322 }
312 323
313 private: 324 private:
314 // Hosts providers for the "org.chromium.LibCrosService" D-Bus service owned 325 // Hosts providers for the "org.chromium.LibCrosService" D-Bus service owned
315 // by Chrome. The name of this service was chosen for historical reasons that 326 // by Chrome. The name of this service was chosen for historical reasons that
316 // are irrelevant now. 327 // are irrelevant now.
317 // TODO(derat): Move these providers into more-specific services that are 328 // TODO(derat): Move these providers into more-specific services that are
318 // split between different processes: http://crbug.com/692246 329 // split between different processes: http://crbug.com/692246
319 std::unique_ptr<CrosDBusService> cros_dbus_service_; 330 std::unique_ptr<CrosDBusService> cros_dbus_service_;
320 331
332 std::unique_ptr<CrosDBusService> liveness_service_;
333
321 std::unique_ptr<NetworkConnectDelegateChromeOS> network_connect_delegate_; 334 std::unique_ptr<NetworkConnectDelegateChromeOS> network_connect_delegate_;
322 335
323 DISALLOW_COPY_AND_ASSIGN(DBusServices); 336 DISALLOW_COPY_AND_ASSIGN(DBusServices);
324 }; 337 };
325 338
326 } // namespace internal 339 } // namespace internal
327 340
328 // ChromeBrowserMainPartsChromeos ---------------------------------------------- 341 // ChromeBrowserMainPartsChromeos ----------------------------------------------
329 342
330 ChromeBrowserMainPartsChromeos::ChromeBrowserMainPartsChromeos( 343 ChromeBrowserMainPartsChromeos::ChromeBrowserMainPartsChromeos(
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 971
959 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 972 ChromeBrowserMainPartsLinux::PostDestroyThreads();
960 973
961 // Destroy DeviceSettingsService after g_browser_process. 974 // Destroy DeviceSettingsService after g_browser_process.
962 DeviceSettingsService::Shutdown(); 975 DeviceSettingsService::Shutdown();
963 976
964 chromeos::ShutdownCloseTracking(); 977 chromeos::ShutdownCloseTracking();
965 } 978 }
966 979
967 } // namespace chromeos 980 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chromeos/dbus/services/liveness_service_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698