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

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

Issue 10824020: Move PROFILE_DESTROYED notification to ProfileDestroyer and observe it in ExtensionProcessManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: destroy original profile->destroy incognito EPM Created 8 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
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 bfb1b4b3bccbe0bde8c7cc1f1dbfcd1a3307b20c..03f4dfc8675c270612220e86651e3cb28a07eb06 100644
--- a/chrome/browser/extensions/extension_process_manager.cc
+++ b/chrome/browser/extensions/extension_process_manager.cc
@@ -150,8 +150,12 @@ ExtensionProcessManager::ExtensionProcessManager(Profile* profile)
content::Source<Profile>(profile));
registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_CONNECTED,
content::NotificationService::AllSources());
- registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING,
- content::NotificationService::AllSources());
+ registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
+ content::Source<Profile>(profile));
+ if (profile->IsOffTheRecord()) {
+ registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
+ content::Source<Profile>(original_profile));
+ }
registrar_.Add(this, content::NOTIFICATION_DEVTOOLS_WINDOW_OPENING,
content::Source<content::BrowserContext>(profile));
registrar_.Add(this, content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING,
@@ -587,7 +591,7 @@ void ExtensionProcessManager::Observe(
break;
}
- case content::NOTIFICATION_APP_TERMINATING: {
+ case chrome::NOTIFICATION_PROFILE_DESTROYED: {
// 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.
« no previous file with comments | « no previous file | chrome/browser/profiles/off_the_record_profile_impl.cc » ('j') | chrome/browser/profiles/profile_destroyer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698