Index: chrome/browser/extensions/api/declarative/rules_registry.h |
diff --git a/chrome/browser/extensions/api/declarative/rules_registry.h b/chrome/browser/extensions/api/declarative/rules_registry.h |
index 4357d6b5b0599d87f26a19fbfaebfbcc34ab9c79..6f5e4ea4cceeae437a5c93d5efc64309b0c1591c 100644 |
--- a/chrome/browser/extensions/api/declarative/rules_registry.h |
+++ b/chrome/browser/extensions/api/declarative/rules_registry.h |
@@ -65,8 +65,10 @@ class RulesRegistry : public base::RefCountedThreadSafe<RulesRegistry> { |
RulesCacheDelegate* cache_delegate, |
const WebViewKey& webview_key); |
- const OneShotEvent& ready() const { |
- return ready_; |
+ // If |ready()| returns NULL, the registry does not wait for the |
+ // |cache_delegate_| to initialize and can be considered ready. |
+ const OneShotEvent* ready() const { |
+ return ready_.get(); |
} |
// RulesRegistry implementation: |
@@ -239,7 +241,7 @@ class RulesRegistry : public base::RefCountedThreadSafe<RulesRegistry> { |
// Signaled when we have finished reading from storage for all extensions that |
// are loaded on startup. |
- OneShotEvent ready_; |
+ scoped_ptr<OneShotEvent> ready_; |
// The factory needs to be declared before |cache_delegate_|, so that it can |
// produce a pointer as a construction argument for |cache_delegate_|. |