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