Index: base/synchronization/waitable_event.h |
diff --git a/base/synchronization/waitable_event.h b/base/synchronization/waitable_event.h |
index b5d91d00b51fd3b2899f39a4707dcef5ebd3424c..a4ca312174087b4f2a9aec34ebcf31f5507012ef 100644 |
--- a/base/synchronization/waitable_event.h |
+++ b/base/synchronization/waitable_event.h |
@@ -43,10 +43,25 @@ class TimeDelta; |
// be better off just using an Windows event directly. |
class BASE_EXPORT WaitableEvent { |
public: |
+ // Indicates whether a WaitableEvent should automatically reset the event |
+ // state after a single waiting thread has been released or remain signaled |
+ // until Reset() is manually invoked. |
+ enum class ResetPolicy { MANUAL, AUTOMATIC }; |
+ |
+ // Indicates whether a new WaitableEvent should start in a signaled state or |
+ // not. |
+ enum class InitialState { SIGNALED, NOT_SIGNALED }; |
+ |
+ // Constructs a WaitableEvent with policy and initial state as detailed in |
+ // the above enums. |
+ WaitableEvent(ResetPolicy reset_policy, InitialState initial_state); |
+ |
// If manual_reset is true, then to set the event state to non-signaled, a |
// consumer must call the Reset method. If this parameter is false, then the |
// system automatically resets the event state to non-signaled after a single |
// waiting thread has been released. |
+ // DEPRECATED: Use the enum-based constructor instead (full removal tracked in |
+ // http://crbug.com/612843). |
WaitableEvent(bool manual_reset, bool initially_signaled); |
#if defined(OS_WIN) |