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

Unified Diff: chrome/browser/extensions/extension_process_manager.cc

Issue 2866034: Refactor shutdown code to allow win/linux to run after last browser closes. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Uploaded patch that resolves merge issue Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_uitest.cc ('k') | chrome/browser/js_modal_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_process_manager.cc
diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc
index cd040f829e499a781382e8c760e1af665b146ccb..3cde54edaab72f376bcccb546faa2d510a37046a 100644
--- a/chrome/browser/extensions/extension_process_manager.cc
+++ b/chrome/browser/extensions/extension_process_manager.cc
@@ -51,13 +51,8 @@ ExtensionProcessManager::ExtensionProcessManager(Profile* profile)
NotificationService::AllSources());
registrar_.Add(this, NotificationType::RENDERER_PROCESS_CLOSED,
NotificationService::AllSources());
-#if defined(OS_WIN) || defined(OS_LINUX)
- registrar_.Add(this, NotificationType::BROWSER_CLOSED,
- NotificationService::AllSources());
-#elif defined(OS_MACOSX)
registrar_.Add(this, NotificationType::APP_TERMINATING,
NotificationService::AllSources());
-#endif
}
ExtensionProcessManager::~ExtensionProcessManager() {
@@ -285,22 +280,14 @@ void ExtensionProcessManager::Observe(NotificationType type,
UnregisterExtensionProcess(host->id());
break;
}
-#if defined(OS_WIN) || defined(OS_LINUX)
- case NotificationType::BROWSER_CLOSED: {
+
+ case NotificationType::APP_TERMINATING: {
// Close background hosts when the last browser is closed so that they
// have time to shutdown various objects on different threads. Our
// destructor is called too late in the shutdown sequence.
- bool app_closing = *Details<bool>(details).ptr();
- if (app_closing)
- CloseBackgroundHosts();
- break;
- }
-#elif defined(OS_MACOSX)
- case NotificationType::APP_TERMINATING: {
CloseBackgroundHosts();
break;
}
-#endif
default:
NOTREACHED();
« no previous file with comments | « chrome/browser/browser_uitest.cc ('k') | chrome/browser/js_modal_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698