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

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

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.h
diff --git a/chrome/browser/extensions/extension_system.h b/chrome/browser/extensions/extension_system.h
index c2bdc609f84d2d17dc27648ae4ca335c980aac9a..0ed70e09012ff911b37d42c97fe12e3a5dab8a0d 100644
--- a/chrome/browser/extensions/extension_system.h
+++ b/chrome/browser/extensions/extension_system.h
@@ -15,6 +15,7 @@
#include "chrome/browser/extensions/api/usb/usb_device_resource.h"
#include "chrome/browser/profiles/profile_keyed_service.h"
#include "chrome/common/extensions/extension_constants.h"
+#include "extensions/common/async_event.h"
class ExtensionInfoMap;
class ExtensionProcessManager;
@@ -140,6 +141,8 @@ class ExtensionSystem : public ProfileKeyedService {
virtual void UnregisterExtensionWithRequestContexts(
const std::string& extension_id,
const extension_misc::UnloadedExtensionReason reason) {}
+
+ virtual const AsyncEvent& ready() const = 0;
};
// The ExtensionSystem for ProfileImpl and OffTheRecordProfileImpl.
@@ -189,6 +192,8 @@ class ExtensionSystemImpl : public ExtensionSystem {
const std::string& extension_id,
const extension_misc::UnloadedExtensionReason reason) OVERRIDE;
+ virtual const AsyncEvent& ready() const OVERRIDE;
+
private:
friend class ExtensionSystemSharedFactory;
@@ -220,6 +225,7 @@ class ExtensionSystemImpl : public ExtensionSystem {
LazyBackgroundTaskQueue* lazy_background_task_queue();
EventRouter* event_router();
ExtensionWarningService* warning_service();
+ const AsyncEvent& ready() const { return ready_; }
private:
Profile* profile_;
@@ -249,6 +255,8 @@ class ExtensionSystemImpl : public ExtensionSystem {
scoped_refptr<ExtensionInfoMap> extension_info_map_;
scoped_ptr<ExtensionWarningService> extension_warning_service_;
scoped_ptr<ExtensionWarningBadgeService> extension_warning_badge_service_;
+
+ AsyncEvent ready_;
};
Profile* profile_;

Powered by Google App Engine
This is Rietveld 408576698