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

Unified Diff: extensions/common/one_shot_event.h

Issue 108193008: Don't post tasks from RulesRegistry c-tor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Creating event as signalled 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 | « chrome/browser/extensions/api/declarative/rules_registry.cc ('k') | extensions/common/one_shot_event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/one_shot_event.h
diff --git a/extensions/common/one_shot_event.h b/extensions/common/one_shot_event.h
index 17ab5c88f73133954f3d1b29335bcb11435d0f8a..9baa152d2c5ce96924978c451efb4efd8bdb557e 100644
--- a/extensions/common/one_shot_event.h
+++ b/extensions/common/one_shot_event.h
@@ -35,6 +35,11 @@ namespace extensions {
class OneShotEvent {
public:
OneShotEvent();
+ // Use the following constructor to create an already signaled event. This is
+ // useful if you construct the event on a different thread from where it is
+ // used, in which case it is not possible to call Signal() just after
+ // construction.
+ explicit OneShotEvent(bool signaled);
~OneShotEvent();
// True if Signal has been called. This function is mostly for
« no previous file with comments | « chrome/browser/extensions/api/declarative/rules_registry.cc ('k') | extensions/common/one_shot_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698