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

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 1285363003: Fix UserSessionManager::Shutdown ordering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <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 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 // CrosSettings singleton before it is destroyed. 730 // CrosSettings singleton before it is destroyed.
731 g_browser_process->platform_part()->ShutdownDeviceDisablingManager(); 731 g_browser_process->platform_part()->ShutdownDeviceDisablingManager();
732 732
733 // Let the AutomaticRebootManager unregister itself as an observer of several 733 // Let the AutomaticRebootManager unregister itself as an observer of several
734 // subsystems. 734 // subsystems.
735 g_browser_process->platform_part()->ShutdownAutomaticRebootManager(); 735 g_browser_process->platform_part()->ShutdownAutomaticRebootManager();
736 736
737 // Clean up dependency on CrosSettings and stop pending data fetches. 737 // Clean up dependency on CrosSettings and stop pending data fetches.
738 KioskAppManager::Shutdown(); 738 KioskAppManager::Shutdown();
739 739
740 // Make sure that there is no pending URLRequests.
741 UserSessionManager::GetInstance()->Shutdown();
742
740 // Give BrowserPolicyConnectorChromeOS a chance to unregister any observers 743 // Give BrowserPolicyConnectorChromeOS a chance to unregister any observers
741 // on services that are going to be deleted later but before its Shutdown() 744 // on services that are going to be deleted later but before its Shutdown()
742 // is called. 745 // is called.
743 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> 746 g_browser_process->platform_part()->browser_policy_connector_chromeos()->
744 PreShutdown(); 747 PreShutdown();
745 748
746 // We first call PostMainMessageLoopRun and then destroy UserManager, because 749 // We first call PostMainMessageLoopRun and then destroy UserManager, because
747 // Ash needs to be closed before UserManager is destroyed. 750 // Ash needs to be closed before UserManager is destroyed.
748 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); 751 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun();
749 752
750 input_method::Shutdown(); 753 input_method::Shutdown();
751 754
752 // Stops all in-flight OAuth2 token fetchers before the IO thread stops. 755 // Stops all in-flight OAuth2 token fetchers before the IO thread stops.
753 DeviceOAuth2TokenServiceFactory::Shutdown(); 756 DeviceOAuth2TokenServiceFactory::Shutdown();
754 757
755 // Shutdown after PostMainMessageLoopRun() which should destroy all observers. 758 // Shutdown after PostMainMessageLoopRun() which should destroy all observers.
756 CrasAudioHandler::Shutdown(); 759 CrasAudioHandler::Shutdown();
757 760
758 // Called after 761 // Called after
759 // ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() to be 762 // ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() to be
760 // executed after execution of chrome::CloseAsh(), because some 763 // executed after execution of chrome::CloseAsh(), because some
761 // parts of WebUI depends on NetworkPortalDetector. 764 // parts of WebUI depends on NetworkPortalDetector.
762 NetworkPortalDetector::Shutdown(); 765 NetworkPortalDetector::Shutdown();
763 766
764 g_browser_process->platform_part()->DestroyChromeUserManager(); 767 g_browser_process->platform_part()->DestroyChromeUserManager();
765 768
766 // Make sure that there is no pending URLRequests.
767 UserSessionManager::GetInstance()->Shutdown();
768
769 g_browser_process->platform_part()->ShutdownSessionManager(); 769 g_browser_process->platform_part()->ShutdownSessionManager();
770 } 770 }
771 771
772 void ChromeBrowserMainPartsChromeos::PostDestroyThreads() { 772 void ChromeBrowserMainPartsChromeos::PostDestroyThreads() {
773 // Destroy DBus services immediately after threads are stopped. 773 // Destroy DBus services immediately after threads are stopped.
774 dbus_services_.reset(); 774 dbus_services_.reset();
775 775
776 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 776 ChromeBrowserMainPartsLinux::PostDestroyThreads();
777 777
778 // Destroy DeviceSettingsService after g_browser_process. 778 // Destroy DeviceSettingsService after g_browser_process.
779 DeviceSettingsService::Shutdown(); 779 DeviceSettingsService::Shutdown();
780 } 780 }
781 781
782 } // namespace chromeos 782 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698