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

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

Issue 2798703002: Create org.chromium.KioskAppService. (Closed)
Patch Set: Fix .conf file comment. Created 3 years, 8 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
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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 CrosDBusService::ServiceProviderList kiosk_service_providers;
259 kiosk_service_providers.push_back(base::MakeUnique<KioskInfoService>(
260 kKioskAppServiceInterface,
261 kKioskAppServiceGetRequiredPlatformVersionMethod));
262 kiosk_info_service_ = CrosDBusService::Create(
263 kKioskAppServiceName, dbus::ObjectPath(kKioskAppServicePath),
264 std::move(kiosk_service_providers));
Daniel Erat 2017/04/05 02:55:41 nit: no idea how clang-format will indent it, but
teravest 2017/04/05 15:58:20 I wrestled with this, but can't figure out how to
Daniel Erat 2017/04/05 18:18:00 hmm. i take it that just passing e.g. {base::Ma
265
256 // Initialize PowerDataCollector after DBusThreadManager is initialized. 266 // Initialize PowerDataCollector after DBusThreadManager is initialized.
257 PowerDataCollector::Initialize(); 267 PowerDataCollector::Initialize();
258 268
259 LoginState::Initialize(); 269 LoginState::Initialize();
260 SystemSaltGetter::Initialize(); 270 SystemSaltGetter::Initialize();
261 TPMTokenLoader::Initialize(); 271 TPMTokenLoader::Initialize();
262 CertLoader::Initialize(); 272 CertLoader::Initialize();
263 273
264 disks::DiskMountManager::Initialize(); 274 disks::DiskMountManager::Initialize();
265 cryptohome::AsyncMethodCaller::Initialize(); 275 cryptohome::AsyncMethodCaller::Initialize();
(...skipping 29 matching lines...) Expand all
295 network_connect_delegate_.reset(); 305 network_connect_delegate_.reset();
296 CertLibrary::Shutdown(); 306 CertLibrary::Shutdown();
297 NetworkHandler::Shutdown(); 307 NetworkHandler::Shutdown();
298 cryptohome::AsyncMethodCaller::Shutdown(); 308 cryptohome::AsyncMethodCaller::Shutdown();
299 disks::DiskMountManager::Shutdown(); 309 disks::DiskMountManager::Shutdown();
300 SystemSaltGetter::Shutdown(); 310 SystemSaltGetter::Shutdown();
301 LoginState::Shutdown(); 311 LoginState::Shutdown();
302 CertLoader::Shutdown(); 312 CertLoader::Shutdown();
303 TPMTokenLoader::Shutdown(); 313 TPMTokenLoader::Shutdown();
304 cros_dbus_service_.reset(); 314 cros_dbus_service_.reset();
315 kiosk_info_service_.reset();
305 PowerDataCollector::Shutdown(); 316 PowerDataCollector::Shutdown();
306 PowerPolicyController::Shutdown(); 317 PowerPolicyController::Shutdown();
307 device::BluetoothAdapterFactory::Shutdown(); 318 device::BluetoothAdapterFactory::Shutdown();
308 bluez::BluezDBusManager::Shutdown(); 319 bluez::BluezDBusManager::Shutdown();
309 320
310 // NOTE: This must only be called if Initialize() was called. 321 // NOTE: This must only be called if Initialize() was called.
311 DBusThreadManager::Shutdown(); 322 DBusThreadManager::Shutdown();
312 } 323 }
313 324
314 private: 325 private:
315 // Hosts providers for the "org.chromium.LibCrosService" D-Bus service owned 326 // 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 327 // by Chrome. The name of this service was chosen for historical reasons that
317 // are irrelevant now. 328 // are irrelevant now.
318 // TODO(derat): Move these providers into more-specific services that are 329 // TODO(derat): Move these providers into more-specific services that are
319 // split between different processes: http://crbug.com/692246 330 // split between different processes: http://crbug.com/692246
320 std::unique_ptr<CrosDBusService> cros_dbus_service_; 331 std::unique_ptr<CrosDBusService> cros_dbus_service_;
332 std::unique_ptr<CrosDBusService> kiosk_info_service_;
Daniel Erat 2017/04/05 02:55:41 nit: add a blank line above this line to make it c
teravest 2017/04/05 15:58:20 Done.
321 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
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698