summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_shutdown.cc
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-23 18:28:38 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-23 18:28:38 +0000
commit1f7bb28be7a99d30b499e10bf2aed71d92d9af86 (patch)
tree9413df6f697afd19d24305677b914034eded9c68 /chrome/browser/browser_shutdown.cc
parentaa310e9f8b2e3d5c8efc4ad977ee43e3e9349606 (diff)
downloadchromium_src-1f7bb28be7a99d30b499e10bf2aed71d92d9af86.zip
chromium_src-1f7bb28be7a99d30b499e10bf2aed71d92d9af86.tar.gz
chromium_src-1f7bb28be7a99d30b499e10bf2aed71d92d9af86.tar.bz2
Adds call to unload plugins on shutdown.
BUG=none TEST=none Review URL: http://codereview.chromium.org/18715 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_shutdown.cc')
-rw-r--r--chrome/browser/browser_shutdown.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc
index 8d0df32..6b0e29b 100644
--- a/chrome/browser/browser_shutdown.cc
+++ b/chrome/browser/browser_shutdown.cc
@@ -22,6 +22,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
+#include "chrome/common/chrome_plugin_lib.h"
#include "chrome/common/resource_bundle.h"
#include "chrome/browser/plugin_service.h"
#include "net/dns_global.h"
@@ -81,6 +82,12 @@ std::wstring GetShutdownMsPath() {
}
void Shutdown() {
+ // Unload plugins. This needs to happen on the IO thread.
+ if (g_browser_process->io_thread()) {
+ g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
+ NewRunnableFunction(&ChromePluginLib::UnloadAllPlugins));
+ }
+
// WARNING: During logoff/shutdown (WM_ENDSESSION) we may not have enough
// time to get here. If you have something that *must* happen on end session,
// consider putting it in BrowserProcessImpl::EndSession.
@@ -189,4 +196,3 @@ void ReadLastShutdownInfo() {
}
} // namespace browser_shutdown
-