| 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 <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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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/system/statistics_provider.h" | 109 #include "chromeos/system/statistics_provider.h" |
| 110 #include "chromeos/tpm/tpm_token_loader.h" | 110 #include "chromeos/tpm/tpm_token_loader.h" |
| 111 #include "components/arc/arc_bridge_service.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" |
| 119 #include "components/wallpaper/wallpaper_manager_base.h" | 120 #include "components/wallpaper/wallpaper_manager_base.h" |
| 120 #include "content/public/browser/browser_thread.h" | 121 #include "content/public/browser/browser_thread.h" |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 content::BrowserThread::FILE), | 380 content::BrowserThread::FILE), |
| 380 load_oem_statistics); | 381 load_oem_statistics); |
| 381 | 382 |
| 382 base::FilePath downloads_directory; | 383 base::FilePath downloads_directory; |
| 383 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory)); | 384 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory)); |
| 384 | 385 |
| 385 DeviceOAuth2TokenServiceFactory::Initialize(); | 386 DeviceOAuth2TokenServiceFactory::Initialize(); |
| 386 | 387 |
| 387 wake_on_wifi_manager_.reset(new WakeOnWifiManager()); | 388 wake_on_wifi_manager_.reset(new WakeOnWifiManager()); |
| 388 | 389 |
| 390 arc_bridge_service_.reset(new arc::ArcBridgeService( |
| 391 content::BrowserThread::GetMessageLoopProxyForThread( |
| 392 content::BrowserThread::IO), |
| 393 content::BrowserThread::GetMessageLoopProxyForThread( |
| 394 content::BrowserThread::FILE))); |
| 395 arc_bridge_service_->DetectAvailability(); |
| 396 |
| 389 ChromeBrowserMainPartsLinux::PreMainMessageLoopRun(); | 397 ChromeBrowserMainPartsLinux::PreMainMessageLoopRun(); |
| 390 } | 398 } |
| 391 | 399 |
| 392 void ChromeBrowserMainPartsChromeos::PreProfileInit() { | 400 void ChromeBrowserMainPartsChromeos::PreProfileInit() { |
| 393 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 401 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
| 394 // -- immediately before Profile creation(). | 402 // -- immediately before Profile creation(). |
| 395 | 403 |
| 396 // Now that the file thread exists we can record our stats. | 404 // Now that the file thread exists we can record our stats. |
| 397 BootTimesRecorder::Get()->RecordChromeMainStats(); | 405 BootTimesRecorder::Get()->RecordChromeMainStats(); |
| 398 LoginEventRecorder::Get()->SetDelegate(BootTimesRecorder::Get()); | 406 LoginEventRecorder::Get()->SetDelegate(BootTimesRecorder::Get()); |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 new EventRewriter(ash::Shell::GetInstance()->sticky_keys_controller()))); | 700 new EventRewriter(ash::Shell::GetInstance()->sticky_keys_controller()))); |
| 693 keyboard_event_rewriters_->Init(); | 701 keyboard_event_rewriters_->Init(); |
| 694 | 702 |
| 695 ChromeBrowserMainPartsLinux::PostBrowserStart(); | 703 ChromeBrowserMainPartsLinux::PostBrowserStart(); |
| 696 } | 704 } |
| 697 | 705 |
| 698 // Shut down services before the browser process, etc are destroyed. | 706 // Shut down services before the browser process, etc are destroyed. |
| 699 void ChromeBrowserMainPartsChromeos::PostMainMessageLoopRun() { | 707 void ChromeBrowserMainPartsChromeos::PostMainMessageLoopRun() { |
| 700 BootTimesRecorder::Get()->AddLogoutTimeMarker("UIMessageLoopEnded", true); | 708 BootTimesRecorder::Get()->AddLogoutTimeMarker("UIMessageLoopEnded", true); |
| 701 | 709 |
| 710 arc_bridge_service_->Shutdown(); |
| 711 |
| 702 // Destroy the application name notifier for Kiosk mode. | 712 // Destroy the application name notifier for Kiosk mode. |
| 703 KioskModeIdleAppNameNotification::Shutdown(); | 713 KioskModeIdleAppNameNotification::Shutdown(); |
| 704 | 714 |
| 705 // Shutdown the upgrade detector for Chrome OS. The upgrade detector | 715 // Shutdown the upgrade detector for Chrome OS. The upgrade detector |
| 706 // stops monitoring changes from the update engine. | 716 // stops monitoring changes from the update engine. |
| 707 if (UpgradeDetectorChromeos::GetInstance()) | 717 if (UpgradeDetectorChromeos::GetInstance()) |
| 708 UpgradeDetectorChromeos::GetInstance()->Shutdown(); | 718 UpgradeDetectorChromeos::GetInstance()->Shutdown(); |
| 709 | 719 |
| 710 // Shutdown the network change notifier for Chrome OS. The network | 720 // Shutdown the network change notifier for Chrome OS. The network |
| 711 // change notifier stops monitoring changes from the power manager and | 721 // change notifier stops monitoring changes from the power manager and |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 // Destroy DBus services immediately after threads are stopped. | 818 // Destroy DBus services immediately after threads are stopped. |
| 809 dbus_services_.reset(); | 819 dbus_services_.reset(); |
| 810 | 820 |
| 811 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 821 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 812 | 822 |
| 813 // Destroy DeviceSettingsService after g_browser_process. | 823 // Destroy DeviceSettingsService after g_browser_process. |
| 814 DeviceSettingsService::Shutdown(); | 824 DeviceSettingsService::Shutdown(); |
| 815 } | 825 } |
| 816 | 826 |
| 817 } // namespace chromeos | 827 } // namespace chromeos |
| OLD | NEW |