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

Unified Diff: chrome/browser/extensions/api/declarative/rules_registry.h

Issue 108193008: Don't post tasks from RulesRegistry c-tor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Now it also compiles Created 7 years 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/declarative/rules_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « no previous file | chrome/browser/extensions/api/declarative/rules_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698