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

Unified Diff: ipc/ipc_sync_message.cc

Issue 2101163002: Reland Mojo-based waiting for IPC::SyncChannel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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_sync_message.h ('k') | ipc/ipc_sync_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_sync_message.cc
diff --git a/ipc/ipc_sync_message.cc b/ipc/ipc_sync_message.cc
index 7f9df7bd9bc0187ace28d3595381c431e00b635b..ba87de8f22e0b7a426da046b0e36d238ad028c7d 100644
--- a/ipc/ipc_sync_message.cc
+++ b/ipc/ipc_sync_message.cc
@@ -9,26 +9,11 @@
#include <stack>
#include "base/atomic_sequence_num.h"
-#include "base/lazy_instance.h"
#include "base/logging.h"
-#include "base/synchronization/waitable_event.h"
#include "build/build_config.h"
namespace {
-struct WaitableEventLazyInstanceTraits
- : public base::DefaultLazyInstanceTraits<base::WaitableEvent> {
- static base::WaitableEvent* New(void* instance) {
- // Use placement new to initialize our instance in our preallocated space.
- return new (instance)
- base::WaitableEvent(base::WaitableEvent::ResetPolicy::MANUAL,
- base::WaitableEvent::InitialState::SIGNALED);
- }
-};
-
-base::LazyInstance<base::WaitableEvent, WaitableEventLazyInstanceTraits>
- dummy_event = LAZY_INSTANCE_INITIALIZER;
-
base::StaticAtomicSequenceNumber g_next_id;
} // namespace
@@ -42,8 +27,7 @@ SyncMessage::SyncMessage(int32_t routing_id,
PriorityValue priority,
MessageReplyDeserializer* deserializer)
: Message(routing_id, type, priority),
- deserializer_(deserializer),
- pump_messages_event_(NULL) {
+ deserializer_(deserializer) {
set_sync();
set_unblock(true);
@@ -61,11 +45,6 @@ MessageReplyDeserializer* SyncMessage::GetReplyDeserializer() {
return deserializer_.release();
}
-void SyncMessage::EnableMessagePumping() {
- DCHECK(!pump_messages_event_);
- set_pump_messages_event(dummy_event.Pointer());
-}
-
bool SyncMessage::IsMessageReplyTo(const Message& msg, int request_id) {
if (!msg.is_reply())
return false;
« no previous file with comments | « ipc/ipc_sync_message.h ('k') | ipc/ipc_sync_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698