OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser_shutdown.h" | 5 #include "chrome/browser/browser_shutdown.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // what thread they're on, so don't worry about it slowing down | 114 // what thread they're on, so don't worry about it slowing down |
115 // shutdown. | 115 // shutdown. |
116 base::ThreadRestrictions::SetIOAllowed(true); | 116 base::ThreadRestrictions::SetIOAllowed(true); |
117 | 117 |
118 // Unload plugins. This needs to happen on the IO thread. | 118 // Unload plugins. This needs to happen on the IO thread. |
119 BrowserThread::PostTask( | 119 BrowserThread::PostTask( |
120 BrowserThread::IO, FROM_HERE, | 120 BrowserThread::IO, FROM_HERE, |
121 NewRunnableFunction(&ChromePluginLib::UnloadAllPlugins)); | 121 NewRunnableFunction(&ChromePluginLib::UnloadAllPlugins)); |
122 | 122 |
123 // Shutdown all IPC channels to service processes. | 123 // Shutdown all IPC channels to service processes. |
124 ServiceProcessControlManager::instance()->Shutdown(); | 124 ServiceProcessControlManager::GetInstance()->Shutdown(); |
125 | 125 |
126 // WARNING: During logoff/shutdown (WM_ENDSESSION) we may not have enough | 126 // WARNING: During logoff/shutdown (WM_ENDSESSION) we may not have enough |
127 // time to get here. If you have something that *must* happen on end session, | 127 // time to get here. If you have something that *must* happen on end session, |
128 // consider putting it in BrowserProcessImpl::EndSession. | 128 // consider putting it in BrowserProcessImpl::EndSession. |
129 DCHECK(g_browser_process); | 129 DCHECK(g_browser_process); |
130 | 130 |
131 // Notifies we are going away. | 131 // Notifies we are going away. |
132 g_browser_process->shutdown_event()->Signal(); | 132 g_browser_process->shutdown_event()->Signal(); |
133 | 133 |
134 PrefService* prefs = g_browser_process->local_state(); | 134 PrefService* prefs = g_browser_process->local_state(); |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 | 319 |
320 bool ShuttingDownWithoutClosingBrowsers() { | 320 bool ShuttingDownWithoutClosingBrowsers() { |
321 #if defined(USE_X11) | 321 #if defined(USE_X11) |
322 if (GetShutdownType() == browser_shutdown::END_SESSION) | 322 if (GetShutdownType() == browser_shutdown::END_SESSION) |
323 return true; | 323 return true; |
324 #endif | 324 #endif |
325 return false; | 325 return false; |
326 } | 326 } |
327 | 327 |
328 } // namespace browser_shutdown | 328 } // namespace browser_shutdown |
OLD | NEW |