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

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

Issue 14757022: Add a non-blocking "OneShotEvent" class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dcronin's comments; ExtensionSystem::ready; and WeakPtr support Created 7 years, 7 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_system.cc
diff --git a/chrome/browser/extensions/extension_system.cc b/chrome/browser/extensions/extension_system.cc
index 0a141447866847d3153f84ec583dde0392dae13f..37b4c857983cffecdf5391b4a08e958afc43aada 100644
--- a/chrome/browser/extensions/extension_system.cc
+++ b/chrome/browser/extensions/extension_system.cc
@@ -151,6 +151,8 @@ void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) {
blacklist_.get(),
autoupdate_enabled,
extensions_enabled));
+ extension_service_->ready().RunAfter(
+ FROM_HERE, base::Bind(&AsyncEvent::MarkHappened, ready_.AsWeakPtr()));
Matt Perry 2013/05/15 21:08:54 I think it will get confusing to have 2 "ready" si
Jeffrey Yasskin 2013/05/15 22:46:50 Ok, I've moved them into ExtensionSystem. They nee
// These services must be registered before the ExtensionService tries to
// load any extensions.
@@ -436,6 +438,10 @@ Blacklist* ExtensionSystemImpl::blacklist() {
return shared_->blacklist();
}
+const AsyncEvent& ExtensionSystemImpl::ready() const {
+ return shared_->ready();
+}
+
void ExtensionSystemImpl::RegisterExtensionWithRequestContexts(
const Extension* extension) {
base::Time install_time;

Powered by Google App Engine
This is Rietveld 408576698