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

Unified Diff: base/synchronization/waitable_event_win.cc

Issue 2030683005: Remove boolean-based WaitableEvent constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrome_thread_watcher
Patch Set: Created 4 years, 6 months 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
Index: base/synchronization/waitable_event_win.cc
diff --git a/base/synchronization/waitable_event_win.cc b/base/synchronization/waitable_event_win.cc
index d16ba6243a6ed6c5e5a48cd9f43ccffd5ebf2bdb..597716337be9c92fa264fecd524da9c643d9f301 100644
--- a/base/synchronization/waitable_event_win.cc
+++ b/base/synchronization/waitable_event_win.cc
@@ -18,11 +18,10 @@ namespace base {
WaitableEvent::WaitableEvent(ResetPolicy reset_policy,
InitialState initial_state)
- : WaitableEvent(reset_policy == ResetPolicy::MANUAL,
- initial_state == InitialState::SIGNALED) {}
-
-WaitableEvent::WaitableEvent(bool manual_reset, bool signaled)
- : handle_(CreateEvent(NULL, manual_reset, signaled, NULL)) {
+ : handle_(CreateEvent(nullptr,
+ reset_policy == ResetPolicy::MANUAL,
+ initial_state == InitialState::SIGNALED,
+ nullptr)) {
// We're probably going to crash anyways if this is ever NULL, so we might as
// well make our stack reports more informative by crashing here.
CHECK(handle_.IsValid());
@@ -33,8 +32,7 @@ WaitableEvent::WaitableEvent(win::ScopedHandle handle)
CHECK(handle_.IsValid()) << "Tried to create WaitableEvent from NULL handle";
}
-WaitableEvent::~WaitableEvent() {
-}
+WaitableEvent::~WaitableEvent() = default;
void WaitableEvent::Reset() {
ResetEvent(handle_.Get());
« base/synchronization/waitable_event_posix.cc ('K') | « base/synchronization/waitable_event_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698