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

Unified Diff: extensions/browser/extension_host.cc

Issue 933423003: Make BackgroundContentsService start up BackgroundContents with a delay, as for ExtensionHosts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: edulcni# Created 5 years, 10 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 | « extensions/browser/extension_host.h ('k') | extensions/browser/extension_host_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_host.cc
diff --git a/extensions/browser/extension_host.cc b/extensions/browser/extension_host.cc
index 84b95313ab9a351d816c21a04c0c8559a02b854c..3d18bf9677db0d383a1bce5b96aca6bdbe713626 100644
--- a/extensions/browser/extension_host.cc
+++ b/extensions/browser/extension_host.cc
@@ -4,7 +4,6 @@
#include "extensions/browser/extension_host.h"
-#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram_macros.h"
@@ -31,7 +30,6 @@
#include "extensions/browser/notification_types.h"
#include "extensions/browser/process_manager.h"
#include "extensions/browser/runtime_data.h"
-#include "extensions/browser/serial_extension_host_queue.h"
#include "extensions/browser/view_type_utils.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_messages.h"
@@ -50,17 +48,6 @@ using content::WebContents;
namespace extensions {
-namespace {
-
-// Singleton which wraps our current ExtensionHostQueue implementation.
-struct QueueWrapper {
- QueueWrapper() : queue(new SerialExtensionHostQueue()) {}
- scoped_ptr<ExtensionHostQueue> queue;
-};
-base::LazyInstance<QueueWrapper> g_queue_wrapper = LAZY_INSTANCE_INITIALIZER;
-
-} // namespace
-
ExtensionHost::ExtensionHost(const Extension* extension,
SiteInstance* site_instance,
const GURL& url,
@@ -110,7 +97,7 @@ ExtensionHost::~ExtensionHost() {
content::Details<ExtensionHost>(this));
FOR_EACH_OBSERVER(ExtensionHostObserver, observer_list_,
OnExtensionHostDestroyed(this));
- g_queue_wrapper.Get().queue->Remove(this);
+ delegate_->GetExtensionHostQueue()->Remove(this);
// Immediately stop observing |host_contents_| because its destruction events
// (like DidStopLoading, it turns out) can call back into ExtensionHost
// re-entrantly, when anything declared after |host_contents_| has already
@@ -138,7 +125,7 @@ void ExtensionHost::CreateRenderViewSoon() {
// to defer.
CreateRenderViewNow();
} else {
- g_queue_wrapper.Get().queue->Add(this);
+ delegate_->GetExtensionHostQueue()->Add(this);
}
}
« no previous file with comments | « extensions/browser/extension_host.h ('k') | extensions/browser/extension_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698