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

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

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