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

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: Remove hacks for clean, but non-working, draft Created 4 years, 11 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_impl.h" 36 #include "chrome/browser/chromeos/arc/arc_auth_service_impl.h"
37 #include "chrome/browser/chromeos/arc/arc_settings_bridge_impl.h" 37 #include "chrome/browser/chromeos/arc/arc_settings_bridge_impl.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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. 377 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads.
377 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { 378 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() {
378 // Set the crypto thread after the IO thread has been created/started. 379 // Set the crypto thread after the IO thread has been created/started.
379 TPMTokenLoader::Get()->SetCryptoTaskRunner( 380 TPMTokenLoader::Get()->SetCryptoTaskRunner(
380 content::BrowserThread::GetMessageLoopProxyForThread( 381 content::BrowserThread::GetMessageLoopProxyForThread(
381 content::BrowserThread::IO)); 382 content::BrowserThread::IO));
382 383
383 CrasAudioHandler::Initialize( 384 CrasAudioHandler::Initialize(
384 new AudioDevicesPrefHandlerImpl(g_browser_process->local_state())); 385 new AudioDevicesPrefHandlerImpl(g_browser_process->local_state()));
385 386
387 quirks_client::QuirksClientDelegate::Initialize(
388 new quirks_client::QuirksClientDelegateImpl(
389 base::MessageLoopForUI::current(),
390 content::BrowserThread::GetBlockingPool(),
391 g_browser_process->local_state(),
392 g_browser_process->system_request_context()));
393
386 // Start loading machine statistics here. StatisticsProvider::Shutdown() 394 // Start loading machine statistics here. StatisticsProvider::Shutdown()
387 // will ensure that loading is aborted on early exit. 395 // will ensure that loading is aborted on early exit.
388 bool load_oem_statistics = !StartupUtils::IsOobeCompleted(); 396 bool load_oem_statistics = !StartupUtils::IsOobeCompleted();
389 system::StatisticsProvider::GetInstance()->StartLoadingMachineStatistics( 397 system::StatisticsProvider::GetInstance()->StartLoadingMachineStatistics(
390 content::BrowserThread::GetMessageLoopProxyForThread( 398 content::BrowserThread::GetMessageLoopProxyForThread(
391 content::BrowserThread::FILE), 399 content::BrowserThread::FILE),
392 load_oem_statistics); 400 load_oem_statistics);
393 401
394 base::FilePath downloads_directory; 402 base::FilePath downloads_directory;
395 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory)); 403 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory));
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 AccessibilityManager::Shutdown(); 819 AccessibilityManager::Shutdown();
812 820
813 input_method::Shutdown(); 821 input_method::Shutdown();
814 822
815 // Stops all in-flight OAuth2 token fetchers before the IO thread stops. 823 // Stops all in-flight OAuth2 token fetchers before the IO thread stops.
816 DeviceOAuth2TokenServiceFactory::Shutdown(); 824 DeviceOAuth2TokenServiceFactory::Shutdown();
817 825
818 // Shutdown after PostMainMessageLoopRun() which should destroy all observers. 826 // Shutdown after PostMainMessageLoopRun() which should destroy all observers.
819 CrasAudioHandler::Shutdown(); 827 CrasAudioHandler::Shutdown();
820 828
829 quirks_client::QuirksClientDelegate::Shutdown();
830
821 // Called after 831 // Called after
822 // ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() to be 832 // ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() to be
823 // executed after execution of chrome::CloseAsh(), because some 833 // executed after execution of chrome::CloseAsh(), because some
824 // parts of WebUI depends on NetworkPortalDetector. 834 // parts of WebUI depends on NetworkPortalDetector.
825 network_portal_detector::Shutdown(); 835 network_portal_detector::Shutdown();
826 836
827 g_browser_process->platform_part()->DestroyChromeUserManager(); 837 g_browser_process->platform_part()->DestroyChromeUserManager();
828 838
829 g_browser_process->platform_part()->ShutdownSessionManager(); 839 g_browser_process->platform_part()->ShutdownSessionManager();
830 } 840 }
831 841
832 void ChromeBrowserMainPartsChromeos::PostDestroyThreads() { 842 void ChromeBrowserMainPartsChromeos::PostDestroyThreads() {
833 // Destroy DBus services immediately after threads are stopped. 843 // Destroy DBus services immediately after threads are stopped.
834 dbus_services_.reset(); 844 dbus_services_.reset();
835 845
836 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 846 ChromeBrowserMainPartsLinux::PostDestroyThreads();
837 847
838 // Destroy DeviceSettingsService after g_browser_process. 848 // Destroy DeviceSettingsService after g_browser_process.
839 DeviceSettingsService::Shutdown(); 849 DeviceSettingsService::Shutdown();
840 } 850 }
841 851
842 } // namespace chromeos 852 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698