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

Unified Diff: ipc/ipc_sync_channel.cc

Issue 6901146: Switch IPC::ChannelProxy to use MessageLoopProxy instead of MessageLoop. This allows us to remov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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_channel.h ('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
===================================================================
--- ipc/ipc_sync_channel.cc (revision 83679)
+++ ipc/ipc_sync_channel.cc (working copy)
@@ -6,7 +6,6 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
-#include "base/message_loop.h"
#include "base/threading/thread_local.h"
#include "base/synchronization/waitable_event.h"
#include "base/synchronization/waitable_event_watcher.h"
@@ -134,7 +133,9 @@
}
WaitableEvent* dispatch_event() { return &dispatch_event_; }
- MessageLoop* listener_message_loop() { return listener_message_loop_; }
+ base::MessageLoopProxy* listener_message_loop() {
+ return listener_message_loop_;
+ }
// Holds a pointer to the per-thread ReceivedSyncMsgQueue object.
static base::LazyInstance<base::ThreadLocalPointer<ReceivedSyncMsgQueue> >
@@ -168,7 +169,7 @@
// as manual reset.
ReceivedSyncMsgQueue() :
dispatch_event_(true, false),
- listener_message_loop_(MessageLoop::current()),
+ listener_message_loop_(base::MessageLoopProxy::CreateForCurrentThread()),
task_pending_(false),
listener_count_(0),
top_send_done_watcher_(NULL) {
@@ -192,7 +193,7 @@
// sender needs its reply before it can reply to our original synchronous
// message.
WaitableEvent dispatch_event_;
- MessageLoop* listener_message_loop_;
+ scoped_refptr<base::MessageLoopProxy> listener_message_loop_;
base::Lock message_lock_;
bool task_pending_;
int listener_count_;
@@ -208,7 +209,7 @@
SyncChannel::SyncContext::SyncContext(
Channel::Listener* listener,
- MessageLoop* ipc_thread,
+ base::MessageLoopProxy* ipc_thread,
WaitableEvent* shutdown_event)
: ChannelProxy::Context(listener, ipc_thread),
received_sync_msgs_(ReceivedSyncMsgQueue::AddContext()),
@@ -371,7 +372,7 @@
const IPC::ChannelHandle& channel_handle,
Channel::Mode mode,
Channel::Listener* listener,
- MessageLoop* ipc_message_loop,
+ base::MessageLoopProxy* ipc_message_loop,
bool create_pipe_now,
WaitableEvent* shutdown_event)
: ChannelProxy(
« no previous file with comments | « ipc/ipc_sync_channel.h ('k') | ipc/ipc_sync_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698