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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
690 new EventRewriter(ash::Shell::GetInstance()->sticky_keys_controller()))); | 698 new EventRewriter(ash::Shell::GetInstance()->sticky_keys_controller()))); |
691 keyboard_event_rewriters_->Init(); | 699 keyboard_event_rewriters_->Init(); |
692 | 700 |
693 ChromeBrowserMainPartsLinux::PostBrowserStart(); | 701 ChromeBrowserMainPartsLinux::PostBrowserStart(); |
694 } | 702 } |
695 | 703 |
696 // Shut down services before the browser process, etc are destroyed. | 704 // Shut down services before the browser process, etc are destroyed. |
697 void ChromeBrowserMainPartsChromeos::PostMainMessageLoopRun() { | 705 void ChromeBrowserMainPartsChromeos::PostMainMessageLoopRun() { |
698 BootTimesRecorder::Get()->AddLogoutTimeMarker("UIMessageLoopEnded", true); | 706 BootTimesRecorder::Get()->AddLogoutTimeMarker("UIMessageLoopEnded", true); |
699 | 707 |
708 // Stop the currently running ARC instance, if any. | |
jochen (gone - plz use gerrit)
2015/11/12 23:40:58
that comment doesn't add value
Luis Héctor Chávez
2015/11/13 00:29:29
Done.
| |
709 arc_bridge_service_->Shutdown(); | |
710 | |
700 // Destroy the application name notifier for Kiosk mode. | 711 // Destroy the application name notifier for Kiosk mode. |
701 KioskModeIdleAppNameNotification::Shutdown(); | 712 KioskModeIdleAppNameNotification::Shutdown(); |
702 | 713 |
703 // Shutdown the upgrade detector for Chrome OS. The upgrade detector | 714 // Shutdown the upgrade detector for Chrome OS. The upgrade detector |
704 // stops monitoring changes from the update engine. | 715 // stops monitoring changes from the update engine. |
705 if (UpgradeDetectorChromeos::GetInstance()) | 716 if (UpgradeDetectorChromeos::GetInstance()) |
706 UpgradeDetectorChromeos::GetInstance()->Shutdown(); | 717 UpgradeDetectorChromeos::GetInstance()->Shutdown(); |
707 | 718 |
708 // Shutdown the network change notifier for Chrome OS. The network | 719 // Shutdown the network change notifier for Chrome OS. The network |
709 // change notifier stops monitoring changes from the power manager and | 720 // change notifier stops monitoring changes from the power manager and |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
806 // Destroy DBus services immediately after threads are stopped. | 817 // Destroy DBus services immediately after threads are stopped. |
807 dbus_services_.reset(); | 818 dbus_services_.reset(); |
808 | 819 |
809 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 820 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
810 | 821 |
811 // Destroy DeviceSettingsService after g_browser_process. | 822 // Destroy DeviceSettingsService after g_browser_process. |
812 DeviceSettingsService::Shutdown(); | 823 DeviceSettingsService::Shutdown(); |
813 } | 824 } |
814 | 825 |
815 } // namespace chromeos | 826 } // namespace chromeos |
OLD | NEW |