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

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

Issue 1877153003: mash: Fix crashes during chrome teardown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | content/browser/browser_main_loop.cc » ('j') | 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 805
806 // SystemKeyEventListener::Shutdown() is always safe to call, 806 // SystemKeyEventListener::Shutdown() is always safe to call,
807 // even if Initialize() wasn't called. 807 // even if Initialize() wasn't called.
808 SystemKeyEventListener::Shutdown(); 808 SystemKeyEventListener::Shutdown();
809 #endif 809 #endif
810 810
811 // Detach D-Bus clients before DBusThreadManager is shut down. 811 // Detach D-Bus clients before DBusThreadManager is shut down.
812 power_button_observer_.reset(); 812 power_button_observer_.reset();
813 idle_action_warning_observer_.reset(); 813 idle_action_warning_observer_.reset();
814 814
815 MagnificationManager::Shutdown(); 815 if (!IsRunningAsMusClient())
816 MagnificationManager::Shutdown();
816 817
817 media::SoundsManager::Shutdown(); 818 media::SoundsManager::Shutdown();
818 819
819 system::StatisticsProvider::GetInstance()->Shutdown(); 820 system::StatisticsProvider::GetInstance()->Shutdown();
820 821
821 // Let the UserManager and WallpaperManager unregister itself as an observer 822 // Let the UserManager and WallpaperManager unregister itself as an observer
822 // of the CrosSettings singleton before it is destroyed. This also ensures 823 // of the CrosSettings singleton before it is destroyed. This also ensures
823 // that the UserManager has no URLRequest pending (see 824 // that the UserManager has no URLRequest pending (see
824 // http://crbug.com/276659). 825 // http://crbug.com/276659).
825 g_browser_process->platform_part()->user_manager()->Shutdown(); 826 g_browser_process->platform_part()->user_manager()->Shutdown();
(...skipping 16 matching lines...) Expand all
842 // Give BrowserPolicyConnectorChromeOS a chance to unregister any observers 843 // Give BrowserPolicyConnectorChromeOS a chance to unregister any observers
843 // on services that are going to be deleted later but before its Shutdown() 844 // on services that are going to be deleted later but before its Shutdown()
844 // is called. 845 // is called.
845 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> 846 g_browser_process->platform_part()->browser_policy_connector_chromeos()->
846 PreShutdown(); 847 PreShutdown();
847 848
848 // We first call PostMainMessageLoopRun and then destroy UserManager, because 849 // We first call PostMainMessageLoopRun and then destroy UserManager, because
849 // Ash needs to be closed before UserManager is destroyed. 850 // Ash needs to be closed before UserManager is destroyed.
850 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); 851 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun();
851 852
852 AccessibilityManager::Shutdown(); 853 if (!IsRunningAsMusClient())
854 AccessibilityManager::Shutdown();
853 855
854 input_method::Shutdown(); 856 input_method::Shutdown();
855 857
856 // Stops all in-flight OAuth2 token fetchers before the IO thread stops. 858 // Stops all in-flight OAuth2 token fetchers before the IO thread stops.
857 DeviceOAuth2TokenServiceFactory::Shutdown(); 859 DeviceOAuth2TokenServiceFactory::Shutdown();
858 860
859 // Shutdown after PostMainMessageLoopRun() which should destroy all observers. 861 // Shutdown after PostMainMessageLoopRun() which should destroy all observers.
860 CrasAudioHandler::Shutdown(); 862 CrasAudioHandler::Shutdown();
861 863
862 quirks::QuirksManager::Shutdown(); 864 quirks::QuirksManager::Shutdown();
(...skipping 13 matching lines...) Expand all
876 // Destroy DBus services immediately after threads are stopped. 878 // Destroy DBus services immediately after threads are stopped.
877 dbus_services_.reset(); 879 dbus_services_.reset();
878 880
879 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 881 ChromeBrowserMainPartsLinux::PostDestroyThreads();
880 882
881 // Destroy DeviceSettingsService after g_browser_process. 883 // Destroy DeviceSettingsService after g_browser_process.
882 DeviceSettingsService::Shutdown(); 884 DeviceSettingsService::Shutdown();
883 } 885 }
884 886
885 } // namespace chromeos 887 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698