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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 net::EnableSSLServerSockets(); | 375 net::EnableSSLServerSockets(); |
376 | 376 |
377 ChromeBrowserMainPartsLinux::PostMainMessageLoopStart(); | 377 ChromeBrowserMainPartsLinux::PostMainMessageLoopStart(); |
378 } | 378 } |
379 | 379 |
380 // Threads are initialized between MainMessageLoopStart and MainMessageLoopRun. | 380 // Threads are initialized between MainMessageLoopStart and MainMessageLoopRun. |
381 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. | 381 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. |
382 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { | 382 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { |
383 // Set the crypto thread after the IO thread has been created/started. | 383 // Set the crypto thread after the IO thread has been created/started. |
384 TPMTokenLoader::Get()->SetCryptoTaskRunner( | 384 TPMTokenLoader::Get()->SetCryptoTaskRunner( |
385 content::BrowserThread::GetMessageLoopProxyForThread( | 385 content::BrowserThread::GetTaskRunnerForThread( |
386 content::BrowserThread::IO)); | 386 content::BrowserThread::IO)); |
387 | 387 |
388 CrasAudioHandler::Initialize( | 388 CrasAudioHandler::Initialize( |
389 new AudioDevicesPrefHandlerImpl(g_browser_process->local_state())); | 389 new AudioDevicesPrefHandlerImpl(g_browser_process->local_state())); |
390 | 390 |
391 quirks::QuirksManager::Initialize( | 391 quirks::QuirksManager::Initialize( |
392 std::unique_ptr<quirks::QuirksManager::Delegate>( | 392 std::unique_ptr<quirks::QuirksManager::Delegate>( |
393 new quirks::QuirksManagerDelegateImpl()), | 393 new quirks::QuirksManagerDelegateImpl()), |
394 content::BrowserThread::GetBlockingPool(), | 394 content::BrowserThread::GetBlockingPool(), |
395 g_browser_process->local_state(), | 395 g_browser_process->local_state(), |
396 g_browser_process->system_request_context()); | 396 g_browser_process->system_request_context()); |
397 | 397 |
398 // Start loading machine statistics here. StatisticsProvider::Shutdown() | 398 // Start loading machine statistics here. StatisticsProvider::Shutdown() |
399 // will ensure that loading is aborted on early exit. | 399 // will ensure that loading is aborted on early exit. |
400 bool load_oem_statistics = !StartupUtils::IsOobeCompleted(); | 400 bool load_oem_statistics = !StartupUtils::IsOobeCompleted(); |
401 system::StatisticsProvider::GetInstance()->StartLoadingMachineStatistics( | 401 system::StatisticsProvider::GetInstance()->StartLoadingMachineStatistics( |
402 content::BrowserThread::GetMessageLoopProxyForThread( | 402 content::BrowserThread::GetTaskRunnerForThread( |
403 content::BrowserThread::FILE), | 403 content::BrowserThread::FILE), |
404 load_oem_statistics); | 404 load_oem_statistics); |
405 | 405 |
406 base::FilePath downloads_directory; | 406 base::FilePath downloads_directory; |
407 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory)); | 407 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory)); |
408 | 408 |
409 DeviceOAuth2TokenServiceFactory::Initialize(); | 409 DeviceOAuth2TokenServiceFactory::Initialize(); |
410 | 410 |
411 wake_on_wifi_manager_.reset(new WakeOnWifiManager()); | 411 wake_on_wifi_manager_.reset(new WakeOnWifiManager()); |
412 | 412 |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
884 // Destroy DBus services immediately after threads are stopped. | 884 // Destroy DBus services immediately after threads are stopped. |
885 dbus_services_.reset(); | 885 dbus_services_.reset(); |
886 | 886 |
887 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 887 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
888 | 888 |
889 // Destroy DeviceSettingsService after g_browser_process. | 889 // Destroy DeviceSettingsService after g_browser_process. |
890 DeviceSettingsService::Shutdown(); | 890 DeviceSettingsService::Shutdown(); |
891 } | 891 } |
892 | 892 |
893 } // namespace chromeos | 893 } // namespace chromeos |
OLD | NEW |