| Index: extensions/browser/process_manager.cc
|
| diff --git a/extensions/browser/process_manager.cc b/extensions/browser/process_manager.cc
|
| index 72fbd2c686f5613723e0fe4e0010223b85d6e447..d111d629b5a460cb38c4065c78ac39cded566d98 100644
|
| --- a/extensions/browser/process_manager.cc
|
| +++ b/extensions/browser/process_manager.cc
|
| @@ -263,12 +263,6 @@ ProcessManager::ProcessManager(BrowserContext* context,
|
| content::NotificationService::AllSources());
|
| registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_CONNECTED,
|
| content::NotificationService::AllSources());
|
| - registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
|
| - content::Source<BrowserContext>(context));
|
| - if (context->IsOffTheRecord()) {
|
| - registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
|
| - content::Source<BrowserContext>(original_context));
|
| - }
|
|
|
| // Note: event_page_idle_time_ must be sufficiently larger (e.g. 2x) than
|
| // kKeepaliveThrottleIntervalInSeconds in ppapi/proxy/plugin_globals.
|
| @@ -633,6 +627,14 @@ void ProcessManager::CancelSuspend(const Extension* extension) {
|
| }
|
| }
|
|
|
| +void ProcessManager::CloseBackgroundHosts() {
|
| + for (ExtensionHostSet::iterator iter = background_hosts_.begin();
|
| + iter != background_hosts_.end();) {
|
| + ExtensionHostSet::iterator current = iter++;
|
| + delete *current;
|
| + }
|
| +}
|
| +
|
| content::BrowserContext* ProcessManager::GetBrowserContext() const {
|
| return site_instance_->GetBrowserContext();
|
| }
|
| @@ -745,14 +747,6 @@ void ProcessManager::Observe(int type,
|
| break;
|
| }
|
|
|
| - 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.
|
| - CloseBackgroundHosts();
|
| - break;
|
| - }
|
| -
|
| default:
|
| NOTREACHED();
|
| }
|
| @@ -854,14 +848,6 @@ void ProcessManager::CloseBackgroundHost(ExtensionHost* host) {
|
| CHECK(background_hosts_.find(host) == background_hosts_.end());
|
| }
|
|
|
| -void ProcessManager::CloseBackgroundHosts() {
|
| - for (ExtensionHostSet::iterator iter = background_hosts_.begin();
|
| - iter != background_hosts_.end(); ) {
|
| - ExtensionHostSet::iterator current = iter++;
|
| - delete *current;
|
| - }
|
| -}
|
| -
|
| void ProcessManager::UnregisterExtension(const std::string& extension_id) {
|
| // The lazy_keepalive_count may be greater than zero at this point because
|
| // RenderViewHosts are still alive. During extension reloading, they will
|
|
|