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

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

Issue 2904763002: dbus: Provide LivenessService.CheckLiveness (Closed)
Patch Set: dbus: Provide LivenessService.CheckLiveness Created 3 years, 7 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 // |proxy_resolution_service_| instead: http://crbug.com/703217 281 // |proxy_resolution_service_| instead: http://crbug.com/703217
282 service_providers.push_back( 282 service_providers.push_back(
283 base::MakeUnique<ProxyResolutionServiceProvider>( 283 base::MakeUnique<ProxyResolutionServiceProvider>(
284 kLibCrosServiceInterface, kResolveNetworkProxy, 284 kLibCrosServiceInterface, kResolveNetworkProxy,
285 base::MakeUnique<ChromeProxyResolutionServiceProviderDelegate>())); 285 base::MakeUnique<ChromeProxyResolutionServiceProviderDelegate>()));
286 if (GetAshConfig() == ash::Config::CLASSIC) { 286 if (GetAshConfig() == ash::Config::CLASSIC) {
287 // TODO(crbug.com/629707): revisit this with mustash dbus work. 287 // TODO(crbug.com/629707): revisit this with mustash dbus work.
288 service_providers.push_back(base::MakeUnique<DisplayPowerServiceProvider>( 288 service_providers.push_back(base::MakeUnique<DisplayPowerServiceProvider>(
289 base::MakeUnique<ChromeDisplayPowerServiceProviderDelegate>())); 289 base::MakeUnique<ChromeDisplayPowerServiceProviderDelegate>()));
290 } 290 }
291 service_providers.push_back(base::MakeUnique<LivenessServiceProvider>()); 291 // TODO(teravest): Remove this provider once all callers are using
292 // |liveness_service_| instead: http://crbug.com/644322
293 service_providers.push_back(
294 base::MakeUnique<LivenessServiceProvider>(kLibCrosServiceInterface));
292 service_providers.push_back(base::MakeUnique<ScreenLockServiceProvider>()); 295 service_providers.push_back(base::MakeUnique<ScreenLockServiceProvider>());
293 // TODO(sky): once mash supports simplified display mode we should always 296 // TODO(sky): once mash supports simplified display mode we should always
294 // use ChromeConsoleServiceProviderDelegate. 297 // use ChromeConsoleServiceProviderDelegate.
295 if (GetAshConfig() != ash::Config::MASH) { 298 if (GetAshConfig() != ash::Config::MASH) {
296 service_providers.push_back(base::MakeUnique<ConsoleServiceProvider>( 299 service_providers.push_back(base::MakeUnique<ConsoleServiceProvider>(
297 base::MakeUnique<ChromeConsoleServiceProviderDelegate>())); 300 base::MakeUnique<ChromeConsoleServiceProviderDelegate>()));
298 } else { 301 } else {
299 service_providers.push_back(base::MakeUnique<ConsoleServiceProvider>( 302 service_providers.push_back(base::MakeUnique<ConsoleServiceProvider>(
300 base::MakeUnique<MusConsoleServiceProviderDelegate>())); 303 base::MakeUnique<MusConsoleServiceProviderDelegate>()));
301 } 304 }
(...skipping 14 matching lines...) Expand all
316 base::MakeUnique< 319 base::MakeUnique<
317 ChromeProxyResolutionServiceProviderDelegate>()))); 320 ChromeProxyResolutionServiceProviderDelegate>())));
318 321
319 kiosk_info_service_ = CrosDBusService::Create( 322 kiosk_info_service_ = CrosDBusService::Create(
320 kKioskAppServiceName, dbus::ObjectPath(kKioskAppServicePath), 323 kKioskAppServiceName, dbus::ObjectPath(kKioskAppServicePath),
321 CrosDBusService::CreateServiceProviderList( 324 CrosDBusService::CreateServiceProviderList(
322 base::MakeUnique<KioskInfoService>( 325 base::MakeUnique<KioskInfoService>(
323 kKioskAppServiceInterface, 326 kKioskAppServiceInterface,
324 kKioskAppServiceGetRequiredPlatformVersionMethod))); 327 kKioskAppServiceGetRequiredPlatformVersionMethod)));
325 328
329 liveness_service_ = CrosDBusService::Create(
330 kLivenessServiceName, dbus::ObjectPath(kLivenessServicePath),
331 CrosDBusService::CreateServiceProviderList(
332 base::MakeUnique<LivenessServiceProvider>(
333 kLivenessServiceInterface)));
334
326 // Initialize PowerDataCollector after DBusThreadManager is initialized. 335 // Initialize PowerDataCollector after DBusThreadManager is initialized.
327 PowerDataCollector::Initialize(); 336 PowerDataCollector::Initialize();
328 337
329 LoginState::Initialize(); 338 LoginState::Initialize();
330 SystemSaltGetter::Initialize(); 339 SystemSaltGetter::Initialize();
331 TPMTokenLoader::Initialize(); 340 TPMTokenLoader::Initialize();
332 CertLoader::Initialize(); 341 CertLoader::Initialize();
333 342
334 disks::DiskMountManager::Initialize(); 343 disks::DiskMountManager::Initialize();
335 cryptohome::AsyncMethodCaller::Initialize(); 344 cryptohome::AsyncMethodCaller::Initialize();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 NetworkHandler::Shutdown(); 376 NetworkHandler::Shutdown();
368 cryptohome::AsyncMethodCaller::Shutdown(); 377 cryptohome::AsyncMethodCaller::Shutdown();
369 disks::DiskMountManager::Shutdown(); 378 disks::DiskMountManager::Shutdown();
370 SystemSaltGetter::Shutdown(); 379 SystemSaltGetter::Shutdown();
371 LoginState::Shutdown(); 380 LoginState::Shutdown();
372 CertLoader::Shutdown(); 381 CertLoader::Shutdown();
373 TPMTokenLoader::Shutdown(); 382 TPMTokenLoader::Shutdown();
374 cros_dbus_service_.reset(); 383 cros_dbus_service_.reset();
375 proxy_resolution_service_.reset(); 384 proxy_resolution_service_.reset();
376 kiosk_info_service_.reset(); 385 kiosk_info_service_.reset();
386 liveness_service_.reset();
377 PowerDataCollector::Shutdown(); 387 PowerDataCollector::Shutdown();
378 PowerPolicyController::Shutdown(); 388 PowerPolicyController::Shutdown();
379 device::BluetoothAdapterFactory::Shutdown(); 389 device::BluetoothAdapterFactory::Shutdown();
380 bluez::BluezDBusManager::Shutdown(); 390 bluez::BluezDBusManager::Shutdown();
381 391
382 // NOTE: This must only be called if Initialize() was called. 392 // NOTE: This must only be called if Initialize() was called.
383 DBusThreadManager::Shutdown(); 393 DBusThreadManager::Shutdown();
384 } 394 }
385 395
386 private: 396 private:
387 // Hosts providers for the "org.chromium.LibCrosService" D-Bus service owned 397 // Hosts providers for the "org.chromium.LibCrosService" D-Bus service owned
388 // by Chrome. The name of this service was chosen for historical reasons that 398 // by Chrome. The name of this service was chosen for historical reasons that
389 // are irrelevant now. 399 // are irrelevant now.
390 // TODO(derat): Move these providers into more-specific services that are 400 // TODO(derat): Move these providers into more-specific services that are
391 // split between different processes: http://crbug.com/692246 401 // split between different processes: http://crbug.com/692246
392 std::unique_ptr<CrosDBusService> cros_dbus_service_; 402 std::unique_ptr<CrosDBusService> cros_dbus_service_;
393 403
394 std::unique_ptr<CrosDBusService> proxy_resolution_service_; 404 std::unique_ptr<CrosDBusService> proxy_resolution_service_;
395 std::unique_ptr<CrosDBusService> kiosk_info_service_; 405 std::unique_ptr<CrosDBusService> kiosk_info_service_;
406 std::unique_ptr<CrosDBusService> liveness_service_;
396 407
397 std::unique_ptr<NetworkConnectDelegateChromeOS> network_connect_delegate_; 408 std::unique_ptr<NetworkConnectDelegateChromeOS> network_connect_delegate_;
398 409
399 DISALLOW_COPY_AND_ASSIGN(DBusServices); 410 DISALLOW_COPY_AND_ASSIGN(DBusServices);
400 }; 411 };
401 412
402 // Initializes a global NSSCertDatabase for the system token and starts 413 // Initializes a global NSSCertDatabase for the system token and starts
403 // CertLoader with that database. Note that this is triggered from 414 // CertLoader with that database. Note that this is triggered from
404 // PreMainMessageLoopRun, which is executed after PostMainMessageLoopStart, 415 // PreMainMessageLoopRun, which is executed after PostMainMessageLoopStart,
405 // where CertLoader is initialized. We can thus assume that CertLoader is 416 // where CertLoader is initialized. We can thus assume that CertLoader is
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 // outlive CertLoader. 1128 // outlive CertLoader.
1118 system_token_certdb_initializer_.reset(); 1129 system_token_certdb_initializer_.reset();
1119 1130
1120 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 1131 ChromeBrowserMainPartsLinux::PostDestroyThreads();
1121 1132
1122 // Destroy DeviceSettingsService after g_browser_process. 1133 // Destroy DeviceSettingsService after g_browser_process.
1123 DeviceSettingsService::Shutdown(); 1134 DeviceSettingsService::Shutdown();
1124 } 1135 }
1125 1136
1126 } // namespace chromeos 1137 } // 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