Index: chrome/browser/extensions/extension_system.h |
diff --git a/chrome/browser/extensions/extension_system.h b/chrome/browser/extensions/extension_system.h |
index f7da8b9782d42945e1e913d0f0c370d86db10445..124c22b0189fd3d108e050cd31729e19c7188499 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/one_shot_event.h" |
class ExtensionInfoMap; |
class ExtensionProcessManager; |
@@ -132,6 +133,9 @@ class ExtensionSystem : public ProfileKeyedService { |
virtual void UnregisterExtensionWithRequestContexts( |
const std::string& extension_id, |
const extension_misc::UnloadedExtensionReason reason) {} |
+ |
+ // Signaled when the extension system has completed its startup tasks. |
+ virtual const OneShotEvent& ready() const = 0; |
}; |
// The ExtensionSystem for ProfileImpl and OffTheRecordProfileImpl. |
@@ -179,6 +183,8 @@ class ExtensionSystemImpl : public ExtensionSystem { |
const std::string& extension_id, |
const extension_misc::UnloadedExtensionReason reason) OVERRIDE; |
+ virtual const OneShotEvent& ready() const OVERRIDE; |
+ |
private: |
friend class ExtensionSystemSharedFactory; |
@@ -209,6 +215,7 @@ class ExtensionSystemImpl : public ExtensionSystem { |
LazyBackgroundTaskQueue* lazy_background_task_queue(); |
EventRouter* event_router(); |
ExtensionWarningService* warning_service(); |
+ const OneShotEvent& ready() const { return ready_; } |
private: |
Profile* profile_; |
@@ -235,6 +242,8 @@ class ExtensionSystemImpl : public ExtensionSystem { |
scoped_refptr<ExtensionInfoMap> extension_info_map_; |
scoped_ptr<ExtensionWarningService> extension_warning_service_; |
scoped_ptr<ExtensionWarningBadgeService> extension_warning_badge_service_; |
+ |
+ OneShotEvent ready_; |
}; |
Profile* profile_; |