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

Unified Diff: ipc/ipc_channel_proxy.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_channel_proxy.h ('k') | ipc/ipc_sync_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_proxy.cc
===================================================================
--- ipc/ipc_channel_proxy.cc (revision 83679)
+++ ipc/ipc_channel_proxy.cc (working copy)
@@ -4,7 +4,6 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop.h"
#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_logging.h"
#include "ipc/ipc_message_utils.h"
@@ -60,14 +59,17 @@
//------------------------------------------------------------------------------
ChannelProxy::Context::Context(Channel::Listener* listener,
- MessageLoop* ipc_message_loop)
- : listener_message_loop_(MessageLoop::current()),
+ base::MessageLoopProxy* ipc_message_loop)
+ : listener_message_loop_(base::MessageLoopProxy::CreateForCurrentThread()),
listener_(listener),
ipc_message_loop_(ipc_message_loop),
peer_pid_(0),
channel_connected_called_(false) {
}
+ChannelProxy::Context::~Context() {
+}
+
void ChannelProxy::Context::CreateChannel(const IPC::ChannelHandle& handle,
const Channel::Mode& mode) {
DCHECK(channel_.get() == NULL);
@@ -280,14 +282,14 @@
ChannelProxy::ChannelProxy(const IPC::ChannelHandle& channel_handle,
Channel::Mode mode,
Channel::Listener* listener,
- MessageLoop* ipc_thread)
+ base::MessageLoopProxy* ipc_thread)
: context_(new Context(listener, ipc_thread)) {
Init(channel_handle, mode, ipc_thread, true);
}
ChannelProxy::ChannelProxy(const IPC::ChannelHandle& channel_handle,
Channel::Mode mode,
- MessageLoop* ipc_thread,
+ base::MessageLoopProxy* ipc_thread,
Context* context,
bool create_pipe_now)
: context_(context) {
@@ -299,7 +301,8 @@
}
void ChannelProxy::Init(const IPC::ChannelHandle& channel_handle,
- Channel::Mode mode, MessageLoop* ipc_thread_loop,
+ Channel::Mode mode,
+ base::MessageLoopProxy* ipc_thread_loop,
bool create_pipe_now) {
#if defined(OS_POSIX)
// When we are creating a server on POSIX, we need its file descriptor
« no previous file with comments | « ipc/ipc_channel_proxy.h ('k') | ipc/ipc_sync_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698