Chromium Code Reviews| 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 7871c5048d6b687ac7606c41b768227fe56ace20..b0a7338d356b1488728c68a243f346fd5bec4cb2 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 (cache_delegate_) ? &ready_ : NULL; |
|
Fady Samuel
2013/12/12 17:54:39
What about making ready_ a scoped_ptr<OneShotEvent
vabr (Chromium)
2013/12/13 16:03:33
Done.
|
| } |
| // RulesRegistry implementation: |