| 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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 WallpaperManager::Get()->Shutdown(); | 745 WallpaperManager::Get()->Shutdown(); |
| 746 | 746 |
| 747 // Let the AutomaticRebootManager unregister itself as an observer of several | 747 // Let the AutomaticRebootManager unregister itself as an observer of several |
| 748 // subsystems. | 748 // subsystems. |
| 749 g_browser_process->platform_part()->ShutdownAutomaticRebootManager(); | 749 g_browser_process->platform_part()->ShutdownAutomaticRebootManager(); |
| 750 | 750 |
| 751 // Clean up dependency on CrosSettings and stop pending data fetches. | 751 // Clean up dependency on CrosSettings and stop pending data fetches. |
| 752 KioskAppManager::Shutdown(); | 752 KioskAppManager::Shutdown(); |
| 753 | 753 |
| 754 // We first call PostMainMessageLoopRun and then destroy UserManager, because | 754 // We first call PostMainMessageLoopRun and then destroy UserManager, because |
| 755 // Ash needs to be closed before UserManager is destroyed. Also, on some tests | 755 // Ash needs to be closed before UserManager is destroyed. |
| 756 // MergeSessionThrottle::ShouldShowMergeSessionPage gets triggered during | |
| 757 // PostMainMessageLoopRun, which also requires UserManager to live (see | |
| 758 // http://crbug.com/243364). | |
| 759 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); | 756 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); |
| 760 | 757 |
| 761 // Called after | 758 // Called after |
| 762 // ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() to be | 759 // ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() to be |
| 763 // executed after execution of chrome::CloseAsh(), because some | 760 // executed after execution of chrome::CloseAsh(), because some |
| 764 // parts of WebUI depends on NetworkPortalDetector. | 761 // parts of WebUI depends on NetworkPortalDetector. |
| 765 NetworkPortalDetector::Shutdown(); | 762 NetworkPortalDetector::Shutdown(); |
| 766 | 763 |
| 767 UserManager::Destroy(); | 764 UserManager::Destroy(); |
| 768 } | 765 } |
| 769 | 766 |
| 770 void ChromeBrowserMainPartsChromeos::PostDestroyThreads() { | 767 void ChromeBrowserMainPartsChromeos::PostDestroyThreads() { |
| 771 // Destroy DBus services immediately after threads are stopped. | 768 // Destroy DBus services immediately after threads are stopped. |
| 772 dbus_services_.reset(); | 769 dbus_services_.reset(); |
| 773 | 770 |
| 774 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 771 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 775 | 772 |
| 776 // Destroy DeviceSettingsService after g_browser_process. | 773 // Destroy DeviceSettingsService after g_browser_process. |
| 777 DeviceSettingsService::Shutdown(); | 774 DeviceSettingsService::Shutdown(); |
| 778 } | 775 } |
| 779 | 776 |
| 780 } // namespace chromeos | 777 } // namespace chromeos |
| OLD | NEW |