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

Unified Diff: ipc/ipc_sync_channel.cc

Issue 2027303002: Migrate WaitableEvent to enum-based constructor in ipc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: Created 4 years, 7 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
« no previous file with comments | « ipc/ipc_send_fds_test.cc ('k') | ipc/ipc_sync_channel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_sync_channel.cc
diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc
index efc008a03abbb4684f6247e83689d609dbf2917c..6485139c621f4f633391fda7c9b79084db8633f9 100644
--- a/ipc/ipc_sync_channel.cc
+++ b/ipc/ipc_sync_channel.cc
@@ -190,14 +190,14 @@ class SyncChannel::ReceivedSyncMsgQueue :
// See the comment in SyncChannel::SyncChannel for why this event is created
// as manual reset.
- ReceivedSyncMsgQueue() :
- message_queue_version_(0),
- dispatch_event_(true, false),
- listener_task_runner_(base::ThreadTaskRunnerHandle::Get()),
- task_pending_(false),
- listener_count_(0),
- top_send_done_watcher_(NULL) {
- }
+ ReceivedSyncMsgQueue()
+ : message_queue_version_(0),
+ dispatch_event_(base::WaitableEvent::ResetPolicy::MANUAL,
+ base::WaitableEvent::InitialState::NOT_SIGNALED),
+ listener_task_runner_(base::ThreadTaskRunnerHandle::Get()),
+ task_pending_(false),
+ listener_count_(0),
+ top_send_done_watcher_(NULL) {}
~ReceivedSyncMsgQueue() {}
@@ -260,9 +260,10 @@ void SyncChannel::SyncContext::Push(SyncMessage* sync_msg) {
// OnObjectSignalled, another Send can happen which would stop the watcher
// from being called. The event would get watched later, when the nested
// Send completes, so the event will need to remain set.
- PendingSyncMsg pending(SyncMessage::GetMessageId(*sync_msg),
- sync_msg->GetReplyDeserializer(),
- new WaitableEvent(true, false));
+ PendingSyncMsg pending(
+ SyncMessage::GetMessageId(*sync_msg), sync_msg->GetReplyDeserializer(),
+ new WaitableEvent(base::WaitableEvent::ResetPolicy::MANUAL,
+ base::WaitableEvent::InitialState::NOT_SIGNALED));
base::AutoLock auto_lock(deserializers_lock_);
deserializers_.push_back(pending);
}
« no previous file with comments | « ipc/ipc_send_fds_test.cc ('k') | ipc/ipc_sync_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698