Index: chrome/browser/extensions/extension_service.h |
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h |
index 70b1a5fd094598b098f793d915f266e226ea444b..11ea30890b01f581cea991a040844d7a440f2a92 100644 |
--- a/chrome/browser/extensions/extension_service.h |
+++ b/chrome/browser/extensions/extension_service.h |
@@ -38,6 +38,7 @@ |
#include "chrome/common/extensions/manifest.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
+#include "extensions/common/async_event.h" |
#include "sync/api/string_ordinal.h" |
#include "sync/api/sync_change.h" |
#include "sync/api/syncable_service.h" |
@@ -131,10 +132,17 @@ class ExtensionServiceInterface : public syncer::SyncableService { |
virtual void SyncExtensionChangeIfNeeded( |
const extensions::Extension& extension) = 0; |
- virtual bool is_ready() = 0; |
+ // Whether the extension service is ready. |
+ bool is_ready() const { return ready_.has_happened(); } |
Yoyo Zhou
2013/05/15 22:38:41
Arguably, the point of AsyncEvent is to not have t
Matt Perry
2013/05/15 22:41:54
I was actually leaning the other way - that maybe
Jeffrey Yasskin
2013/05/15 22:46:50
We need is_ready for backward-compatibility with e
|
+ const extensions::AsyncEvent& ready() { return ready_; } |
Matt Perry
2013/05/15 21:08:54
I can see why you did this, but as an interface, t
Jeffrey Yasskin
2013/05/15 22:46:50
Done.
|
// Returns task runner for crx installation file I/O operations. |
virtual base::SequencedTaskRunner* GetFileTaskRunner() = 0; |
+ |
+ protected: |
+ // Record that Init() has been called, and chrome::EXTENSIONS_READY |
+ // has fired. |
+ extensions::AsyncEvent ready_; |
}; |
// Manages installed and running Chromium extensions. |
@@ -521,9 +529,6 @@ class ExtensionService |
extensions::ContentSettingsStore* GetContentSettingsStore(); |
- // Whether the extension service is ready. |
- virtual bool is_ready() OVERRIDE; |
- |
virtual base::SequencedTaskRunner* GetFileTaskRunner() OVERRIDE; |
extensions::ComponentLoader* component_loader() { |
@@ -903,10 +908,6 @@ class ExtensionService |
// Used by dispatchers to limit API quota for individual extensions. |
ExtensionsQuotaService quota_service_; |
- // Record that Init() has been called, and chrome::EXTENSIONS_READY |
- // has fired. |
- bool ready_; |
- |
// Our extension updater, if updates are turned on. |
scoped_ptr<extensions::ExtensionUpdater> updater_; |