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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 ChromeBrowserMainPartsLinux::PostBrowserStart(); | 776 ChromeBrowserMainPartsLinux::PostBrowserStart(); |
777 } | 777 } |
778 | 778 |
779 // Shut down services before the browser process, etc are destroyed. | 779 // Shut down services before the browser process, etc are destroyed. |
780 void ChromeBrowserMainPartsChromeos::PostMainMessageLoopRun() { | 780 void ChromeBrowserMainPartsChromeos::PostMainMessageLoopRun() { |
781 chromeos::ResourceReporter::GetInstance()->StopMonitoring(); | 781 chromeos::ResourceReporter::GetInstance()->StopMonitoring(); |
782 | 782 |
783 BootTimesRecorder::Get()->AddLogoutTimeMarker("UIMessageLoopEnded", true); | 783 BootTimesRecorder::Get()->AddLogoutTimeMarker("UIMessageLoopEnded", true); |
784 | 784 |
785 arc_service_launcher_->Shutdown(); | 785 arc_service_launcher_->Shutdown(); |
786 arc_kiosk_app_manager_.reset(); | |
787 | 786 |
788 // Unregister CrosSettings observers before CrosSettings is destroyed. | 787 // Unregister CrosSettings observers before CrosSettings is destroyed. |
789 shutdown_policy_forwarder_.reset(); | 788 shutdown_policy_forwarder_.reset(); |
790 | 789 |
791 // Destroy the application name notifier for Kiosk mode. | 790 // Destroy the application name notifier for Kiosk mode. |
792 KioskModeIdleAppNameNotification::Shutdown(); | 791 KioskModeIdleAppNameNotification::Shutdown(); |
793 | 792 |
794 // Shutdown the upgrade detector for Chrome OS. The upgrade detector | 793 // Shutdown the upgrade detector for Chrome OS. The upgrade detector |
795 // stops monitoring changes from the update engine. | 794 // stops monitoring changes from the update engine. |
796 if (UpgradeDetectorChromeos::GetInstance()) | 795 if (UpgradeDetectorChromeos::GetInstance()) |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 // Give BrowserPolicyConnectorChromeOS a chance to unregister any observers | 871 // Give BrowserPolicyConnectorChromeOS a chance to unregister any observers |
873 // on services that are going to be deleted later but before its Shutdown() | 872 // on services that are going to be deleted later but before its Shutdown() |
874 // is called. | 873 // is called. |
875 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> | 874 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> |
876 PreShutdown(); | 875 PreShutdown(); |
877 | 876 |
878 // We first call PostMainMessageLoopRun and then destroy UserManager, because | 877 // We first call PostMainMessageLoopRun and then destroy UserManager, because |
879 // Ash needs to be closed before UserManager is destroyed. | 878 // Ash needs to be closed before UserManager is destroyed. |
880 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); | 879 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); |
881 | 880 |
| 881 // Destroy ArcKioskAppManager after its observers are removed when Ash is |
| 882 // closed above. |
| 883 arc_kiosk_app_manager_.reset(); |
| 884 |
882 if (!chrome::IsRunningInMash()) | 885 if (!chrome::IsRunningInMash()) |
883 AccessibilityManager::Shutdown(); | 886 AccessibilityManager::Shutdown(); |
884 | 887 |
885 input_method::Shutdown(); | 888 input_method::Shutdown(); |
886 | 889 |
887 // Stops all in-flight OAuth2 token fetchers before the IO thread stops. | 890 // Stops all in-flight OAuth2 token fetchers before the IO thread stops. |
888 DeviceOAuth2TokenServiceFactory::Shutdown(); | 891 DeviceOAuth2TokenServiceFactory::Shutdown(); |
889 | 892 |
890 // Shutdown after PostMainMessageLoopRun() which should destroy all observers. | 893 // Shutdown after PostMainMessageLoopRun() which should destroy all observers. |
891 CrasAudioHandler::Shutdown(); | 894 CrasAudioHandler::Shutdown(); |
(...skipping 14 matching lines...) Expand all Loading... |
906 // Destroy DBus services immediately after threads are stopped. | 909 // Destroy DBus services immediately after threads are stopped. |
907 dbus_services_.reset(); | 910 dbus_services_.reset(); |
908 | 911 |
909 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 912 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
910 | 913 |
911 // Destroy DeviceSettingsService after g_browser_process. | 914 // Destroy DeviceSettingsService after g_browser_process. |
912 DeviceSettingsService::Shutdown(); | 915 DeviceSettingsService::Shutdown(); |
913 } | 916 } |
914 | 917 |
915 } // namespace chromeos | 918 } // namespace chromeos |
OLD | NEW |