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

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

Issue 1528963002: Quirks Client for downloading and providing display profiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 #include "chromeos/dbus/services/proxy_resolution_service_provider.h" 99 #include "chromeos/dbus/services/proxy_resolution_service_provider.h"
100 #include "chromeos/dbus/session_manager_client.h" 100 #include "chromeos/dbus/session_manager_client.h"
101 #include "chromeos/disks/disk_mount_manager.h" 101 #include "chromeos/disks/disk_mount_manager.h"
102 #include "chromeos/login/login_state.h" 102 #include "chromeos/login/login_state.h"
103 #include "chromeos/login/user_names.h" 103 #include "chromeos/login/user_names.h"
104 #include "chromeos/login_event_recorder.h" 104 #include "chromeos/login_event_recorder.h"
105 #include "chromeos/network/network_change_notifier_chromeos.h" 105 #include "chromeos/network/network_change_notifier_chromeos.h"
106 #include "chromeos/network/network_change_notifier_factory_chromeos.h" 106 #include "chromeos/network/network_change_notifier_factory_chromeos.h"
107 #include "chromeos/network/network_handler.h" 107 #include "chromeos/network/network_handler.h"
108 #include "chromeos/network/portal_detector/network_portal_detector_stub.h" 108 #include "chromeos/network/portal_detector/network_portal_detector_stub.h"
109 #include "chromeos/quirks_client/quirks_client.h"
109 #include "chromeos/system/statistics_provider.h" 110 #include "chromeos/system/statistics_provider.h"
110 #include "chromeos/tpm/tpm_token_loader.h" 111 #include "chromeos/tpm/tpm_token_loader.h"
111 #include "components/browser_sync/common/browser_sync_switches.h" 112 #include "components/browser_sync/common/browser_sync_switches.h"
112 #include "components/device_event_log/device_event_log.h" 113 #include "components/device_event_log/device_event_log.h"
113 #include "components/metrics/metrics_service.h" 114 #include "components/metrics/metrics_service.h"
114 #include "components/ownership/owner_key_util.h" 115 #include "components/ownership/owner_key_util.h"
115 #include "components/session_manager/core/session_manager.h" 116 #include "components/session_manager/core/session_manager.h"
116 #include "components/signin/core/account_id/account_id.h" 117 #include "components/signin/core/account_id/account_id.h"
117 #include "components/user_manager/user.h" 118 #include "components/user_manager/user.h"
118 #include "components/user_manager/user_manager.h" 119 #include "components/user_manager/user_manager.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. 369 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads.
369 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { 370 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() {
370 // Set the crypto thread after the IO thread has been created/started. 371 // Set the crypto thread after the IO thread has been created/started.
371 TPMTokenLoader::Get()->SetCryptoTaskRunner( 372 TPMTokenLoader::Get()->SetCryptoTaskRunner(
372 content::BrowserThread::GetMessageLoopProxyForThread( 373 content::BrowserThread::GetMessageLoopProxyForThread(
373 content::BrowserThread::IO)); 374 content::BrowserThread::IO));
374 375
375 CrasAudioHandler::Initialize( 376 CrasAudioHandler::Initialize(
376 new AudioDevicesPrefHandlerImpl(g_browser_process->local_state())); 377 new AudioDevicesPrefHandlerImpl(g_browser_process->local_state()));
377 378
379 QuirksClientBrowserDelegate::Initialize(
380 base::MessageLoopForUI::current(),
381 content::BrowserThread::GetBlockingPool(),
382 g_browser_process->local_state(),
383 g_browser_process->system_request_context());
384
378 // Start loading machine statistics here. StatisticsProvider::Shutdown() 385 // Start loading machine statistics here. StatisticsProvider::Shutdown()
379 // will ensure that loading is aborted on early exit. 386 // will ensure that loading is aborted on early exit.
380 bool load_oem_statistics = !StartupUtils::IsOobeCompleted(); 387 bool load_oem_statistics = !StartupUtils::IsOobeCompleted();
381 system::StatisticsProvider::GetInstance()->StartLoadingMachineStatistics( 388 system::StatisticsProvider::GetInstance()->StartLoadingMachineStatistics(
382 content::BrowserThread::GetMessageLoopProxyForThread( 389 content::BrowserThread::GetMessageLoopProxyForThread(
383 content::BrowserThread::FILE), 390 content::BrowserThread::FILE),
384 load_oem_statistics); 391 load_oem_statistics);
385 392
386 base::FilePath downloads_directory; 393 base::FilePath downloads_directory;
387 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory)); 394 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory));
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 AccessibilityManager::Shutdown(); 810 AccessibilityManager::Shutdown();
804 811
805 input_method::Shutdown(); 812 input_method::Shutdown();
806 813
807 // Stops all in-flight OAuth2 token fetchers before the IO thread stops. 814 // Stops all in-flight OAuth2 token fetchers before the IO thread stops.
808 DeviceOAuth2TokenServiceFactory::Shutdown(); 815 DeviceOAuth2TokenServiceFactory::Shutdown();
809 816
810 // Shutdown after PostMainMessageLoopRun() which should destroy all observers. 817 // Shutdown after PostMainMessageLoopRun() which should destroy all observers.
811 CrasAudioHandler::Shutdown(); 818 CrasAudioHandler::Shutdown();
812 819
820 QuirksClientBrowserDelegate::Shutdown();
821
813 // Called after 822 // Called after
814 // ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() to be 823 // ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() to be
815 // executed after execution of chrome::CloseAsh(), because some 824 // executed after execution of chrome::CloseAsh(), because some
816 // parts of WebUI depends on NetworkPortalDetector. 825 // parts of WebUI depends on NetworkPortalDetector.
817 network_portal_detector::Shutdown(); 826 network_portal_detector::Shutdown();
818 827
819 g_browser_process->platform_part()->DestroyChromeUserManager(); 828 g_browser_process->platform_part()->DestroyChromeUserManager();
820 829
821 g_browser_process->platform_part()->ShutdownSessionManager(); 830 g_browser_process->platform_part()->ShutdownSessionManager();
822 } 831 }
823 832
824 void ChromeBrowserMainPartsChromeos::PostDestroyThreads() { 833 void ChromeBrowserMainPartsChromeos::PostDestroyThreads() {
825 // Destroy DBus services immediately after threads are stopped. 834 // Destroy DBus services immediately after threads are stopped.
826 dbus_services_.reset(); 835 dbus_services_.reset();
827 836
828 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 837 ChromeBrowserMainPartsLinux::PostDestroyThreads();
829 838
830 // Destroy DeviceSettingsService after g_browser_process. 839 // Destroy DeviceSettingsService after g_browser_process.
831 DeviceSettingsService::Shutdown(); 840 DeviceSettingsService::Shutdown();
832 } 841 }
833 842
834 } // namespace chromeos 843 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698