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

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: Refactor manager and delegate Created 4 years, 10 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 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 22 matching lines...) Expand all
33 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" 33 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h"
34 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 34 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
35 #include "chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification .h" 35 #include "chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification .h"
36 #include "chrome/browser/chromeos/arc/arc_auth_service.h" 36 #include "chrome/browser/chromeos/arc/arc_auth_service.h"
37 #include "chrome/browser/chromeos/arc/arc_intent_helper_bridge.h" 37 #include "chrome/browser/chromeos/arc/arc_intent_helper_bridge.h"
38 #include "chrome/browser/chromeos/boot_times_recorder.h" 38 #include "chrome/browser/chromeos/boot_times_recorder.h"
39 #include "chrome/browser/chromeos/dbus/chrome_console_service_provider_delegate. h" 39 #include "chrome/browser/chromeos/dbus/chrome_console_service_provider_delegate. h"
40 #include "chrome/browser/chromeos/dbus/chrome_display_power_service_provider_del egate.h" 40 #include "chrome/browser/chromeos/dbus/chrome_display_power_service_provider_del egate.h"
41 #include "chrome/browser/chromeos/dbus/chrome_proxy_resolver_delegate.h" 41 #include "chrome/browser/chromeos/dbus/chrome_proxy_resolver_delegate.h"
42 #include "chrome/browser/chromeos/dbus/screen_lock_service_provider.h" 42 #include "chrome/browser/chromeos/dbus/screen_lock_service_provider.h"
43 #include "chrome/browser/chromeos/display/quirks_client_delegate_impl.h"
43 #include "chrome/browser/chromeos/events/event_rewriter.h" 44 #include "chrome/browser/chromeos/events/event_rewriter.h"
44 #include "chrome/browser/chromeos/events/event_rewriter_controller.h" 45 #include "chrome/browser/chromeos/events/event_rewriter_controller.h"
45 #include "chrome/browser/chromeos/events/keyboard_driven_event_rewriter.h" 46 #include "chrome/browser/chromeos/events/keyboard_driven_event_rewriter.h"
46 #include "chrome/browser/chromeos/extensions/default_app_order.h" 47 #include "chrome/browser/chromeos/extensions/default_app_order.h"
47 #include "chrome/browser/chromeos/external_metrics.h" 48 #include "chrome/browser/chromeos/external_metrics.h"
48 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" 49 #include "chrome/browser/chromeos/input_method/input_method_configuration.h"
49 #include "chrome/browser/chromeos/input_method/input_method_util.h" 50 #include "chrome/browser/chromeos/input_method/input_method_util.h"
50 #include "chrome/browser/chromeos/language_preferences.h" 51 #include "chrome/browser/chromeos/language_preferences.h"
51 #include "chrome/browser/chromeos/login/helper.h" 52 #include "chrome/browser/chromeos/login/helper.h"
52 #include "chrome/browser/chromeos/login/lock/screen_locker.h" 53 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. 373 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads.
373 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { 374 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() {
374 // Set the crypto thread after the IO thread has been created/started. 375 // Set the crypto thread after the IO thread has been created/started.
375 TPMTokenLoader::Get()->SetCryptoTaskRunner( 376 TPMTokenLoader::Get()->SetCryptoTaskRunner(
376 content::BrowserThread::GetMessageLoopProxyForThread( 377 content::BrowserThread::GetMessageLoopProxyForThread(
377 content::BrowserThread::IO)); 378 content::BrowserThread::IO));
378 379
379 CrasAudioHandler::Initialize( 380 CrasAudioHandler::Initialize(
380 new AudioDevicesPrefHandlerImpl(g_browser_process->local_state())); 381 new AudioDevicesPrefHandlerImpl(g_browser_process->local_state()));
381 382
383 quirks_client::QuirksClientManager::Initialize(
384 new quirks_client::QuirksClientManager(
385 new quirks_client::QuirksClientDelegateImpl(),
386 base::MessageLoopForUI::current(),
387 content::BrowserThread::GetBlockingPool(),
388 g_browser_process->local_state(),
389 g_browser_process->system_request_context()));
390
382 // Start loading machine statistics here. StatisticsProvider::Shutdown() 391 // Start loading machine statistics here. StatisticsProvider::Shutdown()
383 // will ensure that loading is aborted on early exit. 392 // will ensure that loading is aborted on early exit.
384 bool load_oem_statistics = !StartupUtils::IsOobeCompleted(); 393 bool load_oem_statistics = !StartupUtils::IsOobeCompleted();
385 system::StatisticsProvider::GetInstance()->StartLoadingMachineStatistics( 394 system::StatisticsProvider::GetInstance()->StartLoadingMachineStatistics(
386 content::BrowserThread::GetMessageLoopProxyForThread( 395 content::BrowserThread::GetMessageLoopProxyForThread(
387 content::BrowserThread::FILE), 396 content::BrowserThread::FILE),
388 load_oem_statistics); 397 load_oem_statistics);
389 398
390 base::FilePath downloads_directory; 399 base::FilePath downloads_directory;
391 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory)); 400 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory));
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 AccessibilityManager::Shutdown(); 817 AccessibilityManager::Shutdown();
809 818
810 input_method::Shutdown(); 819 input_method::Shutdown();
811 820
812 // Stops all in-flight OAuth2 token fetchers before the IO thread stops. 821 // Stops all in-flight OAuth2 token fetchers before the IO thread stops.
813 DeviceOAuth2TokenServiceFactory::Shutdown(); 822 DeviceOAuth2TokenServiceFactory::Shutdown();
814 823
815 // Shutdown after PostMainMessageLoopRun() which should destroy all observers. 824 // Shutdown after PostMainMessageLoopRun() which should destroy all observers.
816 CrasAudioHandler::Shutdown(); 825 CrasAudioHandler::Shutdown();
817 826
827 quirks_client::QuirksClientManager::Shutdown();
828
818 // Called after 829 // Called after
819 // ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() to be 830 // ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() to be
820 // executed after execution of chrome::CloseAsh(), because some 831 // executed after execution of chrome::CloseAsh(), because some
821 // parts of WebUI depends on NetworkPortalDetector. 832 // parts of WebUI depends on NetworkPortalDetector.
822 network_portal_detector::Shutdown(); 833 network_portal_detector::Shutdown();
823 834
824 g_browser_process->platform_part()->DestroyChromeUserManager(); 835 g_browser_process->platform_part()->DestroyChromeUserManager();
825 836
826 g_browser_process->platform_part()->ShutdownSessionManager(); 837 g_browser_process->platform_part()->ShutdownSessionManager();
827 } 838 }
828 839
829 void ChromeBrowserMainPartsChromeos::PostDestroyThreads() { 840 void ChromeBrowserMainPartsChromeos::PostDestroyThreads() {
830 // Destroy DBus services immediately after threads are stopped. 841 // Destroy DBus services immediately after threads are stopped.
831 dbus_services_.reset(); 842 dbus_services_.reset();
832 843
833 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 844 ChromeBrowserMainPartsLinux::PostDestroyThreads();
834 845
835 // Destroy DeviceSettingsService after g_browser_process. 846 // Destroy DeviceSettingsService after g_browser_process.
836 DeviceSettingsService::Shutdown(); 847 DeviceSettingsService::Shutdown();
837 } 848 }
838 849
839 } // namespace chromeos 850 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698