| OLD | NEW |
| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 } | 241 } |
| 242 service_providers.push_back(base::MakeUnique<LivenessServiceProvider>()); | 242 service_providers.push_back(base::MakeUnique<LivenessServiceProvider>()); |
| 243 service_providers.push_back(base::MakeUnique<ScreenLockServiceProvider>()); | 243 service_providers.push_back(base::MakeUnique<ScreenLockServiceProvider>()); |
| 244 if (ash_util::IsRunningInMash()) { | 244 if (ash_util::IsRunningInMash()) { |
| 245 service_providers.push_back(base::MakeUnique<ConsoleServiceProvider>( | 245 service_providers.push_back(base::MakeUnique<ConsoleServiceProvider>( |
| 246 base::MakeUnique<MusConsoleServiceProviderDelegate>())); | 246 base::MakeUnique<MusConsoleServiceProviderDelegate>())); |
| 247 } else { | 247 } else { |
| 248 service_providers.push_back(base::MakeUnique<ConsoleServiceProvider>( | 248 service_providers.push_back(base::MakeUnique<ConsoleServiceProvider>( |
| 249 base::MakeUnique<ChromeConsoleServiceProviderDelegate>())); | 249 base::MakeUnique<ChromeConsoleServiceProviderDelegate>())); |
| 250 } | 250 } |
| 251 service_providers.push_back(base::MakeUnique<KioskInfoService>( | 251 service_providers.push_back(base::MakeUnique<KioskInfoService>()); |
| 252 kLibCrosServiceInterface, | |
| 253 kKioskAppServiceGetRequiredPlatformVersionMethod)); | |
| 254 cros_dbus_service_ = CrosDBusService::Create( | 252 cros_dbus_service_ = CrosDBusService::Create( |
| 255 kLibCrosServiceName, dbus::ObjectPath(kLibCrosServicePath), | 253 kLibCrosServiceName, dbus::ObjectPath(kLibCrosServicePath), |
| 256 std::move(service_providers)); | 254 std::move(service_providers)); |
| 257 | 255 |
| 258 kiosk_info_service_ = CrosDBusService::Create( | |
| 259 kKioskAppServiceName, dbus::ObjectPath(kKioskAppServicePath), | |
| 260 CrosDBusService::CreateServiceProviderList( | |
| 261 base::MakeUnique<KioskInfoService>( | |
| 262 kKioskAppServiceInterface, | |
| 263 kKioskAppServiceGetRequiredPlatformVersionMethod))); | |
| 264 | |
| 265 // Initialize PowerDataCollector after DBusThreadManager is initialized. | 256 // Initialize PowerDataCollector after DBusThreadManager is initialized. |
| 266 PowerDataCollector::Initialize(); | 257 PowerDataCollector::Initialize(); |
| 267 | 258 |
| 268 LoginState::Initialize(); | 259 LoginState::Initialize(); |
| 269 SystemSaltGetter::Initialize(); | 260 SystemSaltGetter::Initialize(); |
| 270 TPMTokenLoader::Initialize(); | 261 TPMTokenLoader::Initialize(); |
| 271 CertLoader::Initialize(); | 262 CertLoader::Initialize(); |
| 272 | 263 |
| 273 disks::DiskMountManager::Initialize(); | 264 disks::DiskMountManager::Initialize(); |
| 274 cryptohome::AsyncMethodCaller::Initialize(); | 265 cryptohome::AsyncMethodCaller::Initialize(); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 304 network_connect_delegate_.reset(); | 295 network_connect_delegate_.reset(); |
| 305 CertLibrary::Shutdown(); | 296 CertLibrary::Shutdown(); |
| 306 NetworkHandler::Shutdown(); | 297 NetworkHandler::Shutdown(); |
| 307 cryptohome::AsyncMethodCaller::Shutdown(); | 298 cryptohome::AsyncMethodCaller::Shutdown(); |
| 308 disks::DiskMountManager::Shutdown(); | 299 disks::DiskMountManager::Shutdown(); |
| 309 SystemSaltGetter::Shutdown(); | 300 SystemSaltGetter::Shutdown(); |
| 310 LoginState::Shutdown(); | 301 LoginState::Shutdown(); |
| 311 CertLoader::Shutdown(); | 302 CertLoader::Shutdown(); |
| 312 TPMTokenLoader::Shutdown(); | 303 TPMTokenLoader::Shutdown(); |
| 313 cros_dbus_service_.reset(); | 304 cros_dbus_service_.reset(); |
| 314 kiosk_info_service_.reset(); | |
| 315 PowerDataCollector::Shutdown(); | 305 PowerDataCollector::Shutdown(); |
| 316 PowerPolicyController::Shutdown(); | 306 PowerPolicyController::Shutdown(); |
| 317 device::BluetoothAdapterFactory::Shutdown(); | 307 device::BluetoothAdapterFactory::Shutdown(); |
| 318 bluez::BluezDBusManager::Shutdown(); | 308 bluez::BluezDBusManager::Shutdown(); |
| 319 | 309 |
| 320 // NOTE: This must only be called if Initialize() was called. | 310 // NOTE: This must only be called if Initialize() was called. |
| 321 DBusThreadManager::Shutdown(); | 311 DBusThreadManager::Shutdown(); |
| 322 } | 312 } |
| 323 | 313 |
| 324 private: | 314 private: |
| 325 // Hosts providers for the "org.chromium.LibCrosService" D-Bus service owned | 315 // Hosts providers for the "org.chromium.LibCrosService" D-Bus service owned |
| 326 // by Chrome. The name of this service was chosen for historical reasons that | 316 // by Chrome. The name of this service was chosen for historical reasons that |
| 327 // are irrelevant now. | 317 // are irrelevant now. |
| 328 // TODO(derat): Move these providers into more-specific services that are | 318 // TODO(derat): Move these providers into more-specific services that are |
| 329 // split between different processes: http://crbug.com/692246 | 319 // split between different processes: http://crbug.com/692246 |
| 330 std::unique_ptr<CrosDBusService> cros_dbus_service_; | 320 std::unique_ptr<CrosDBusService> cros_dbus_service_; |
| 331 | 321 |
| 332 std::unique_ptr<CrosDBusService> kiosk_info_service_; | |
| 333 | |
| 334 std::unique_ptr<NetworkConnectDelegateChromeOS> network_connect_delegate_; | 322 std::unique_ptr<NetworkConnectDelegateChromeOS> network_connect_delegate_; |
| 335 | 323 |
| 336 DISALLOW_COPY_AND_ASSIGN(DBusServices); | 324 DISALLOW_COPY_AND_ASSIGN(DBusServices); |
| 337 }; | 325 }; |
| 338 | 326 |
| 339 } // namespace internal | 327 } // namespace internal |
| 340 | 328 |
| 341 // ChromeBrowserMainPartsChromeos ---------------------------------------------- | 329 // ChromeBrowserMainPartsChromeos ---------------------------------------------- |
| 342 | 330 |
| 343 ChromeBrowserMainPartsChromeos::ChromeBrowserMainPartsChromeos( | 331 ChromeBrowserMainPartsChromeos::ChromeBrowserMainPartsChromeos( |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 | 957 |
| 970 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 958 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 971 | 959 |
| 972 // Destroy DeviceSettingsService after g_browser_process. | 960 // Destroy DeviceSettingsService after g_browser_process. |
| 973 DeviceSettingsService::Shutdown(); | 961 DeviceSettingsService::Shutdown(); |
| 974 | 962 |
| 975 chromeos::ShutdownCloseTracking(); | 963 chromeos::ShutdownCloseTracking(); |
| 976 } | 964 } |
| 977 | 965 |
| 978 } // namespace chromeos | 966 } // namespace chromeos |
| OLD | NEW |