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

Side by Side Diff: ipc/ipc_channel_proxy.cc

Issue 7583053: Add MessageLoopProxy::current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for MessageLoopProxy destruction observer. Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/pepper_plugin_delegate_impl.cc ('k') | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/memory/ref_counted.h" 5 #include "base/memory/ref_counted.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "ipc/ipc_channel_proxy.h" 7 #include "ipc/ipc_channel_proxy.h"
8 #include "ipc/ipc_logging.h" 8 #include "ipc/ipc_logging.h"
9 #include "ipc/ipc_message_utils.h" 9 #include "ipc/ipc_message_utils.h"
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 void ChannelProxy::MessageFilter::OnDestruct() const { 55 void ChannelProxy::MessageFilter::OnDestruct() const {
56 delete this; 56 delete this;
57 } 57 }
58 58
59 //------------------------------------------------------------------------------ 59 //------------------------------------------------------------------------------
60 60
61 ChannelProxy::Context::Context(Channel::Listener* listener, 61 ChannelProxy::Context::Context(Channel::Listener* listener,
62 base::MessageLoopProxy* ipc_message_loop) 62 base::MessageLoopProxy* ipc_message_loop)
63 : listener_message_loop_(base::MessageLoopProxy::CreateForCurrentThread()), 63 : listener_message_loop_(base::MessageLoopProxy::current()),
64 listener_(listener), 64 listener_(listener),
65 ipc_message_loop_(ipc_message_loop), 65 ipc_message_loop_(ipc_message_loop),
66 peer_pid_(0), 66 peer_pid_(0),
67 channel_connected_called_(false) { 67 channel_connected_called_(false) {
68 } 68 }
69 69
70 ChannelProxy::Context::~Context() { 70 ChannelProxy::Context::~Context() {
71 } 71 }
72 72
73 void ChannelProxy::Context::CreateChannel(const IPC::ChannelHandle& handle, 73 void ChannelProxy::Context::CreateChannel(const IPC::ChannelHandle& handle,
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 Channel *channel = context_.get()->channel_.get(); 388 Channel *channel = context_.get()->channel_.get();
389 // Channel must have been created first. 389 // Channel must have been created first.
390 DCHECK(channel) << context_.get()->channel_id_; 390 DCHECK(channel) << context_.get()->channel_id_;
391 return channel->GetClientEuid(client_euid); 391 return channel->GetClientEuid(client_euid);
392 } 392 }
393 #endif 393 #endif
394 394
395 //----------------------------------------------------------------------------- 395 //-----------------------------------------------------------------------------
396 396
397 } // namespace IPC 397 } // namespace IPC
OLDNEW
« no previous file with comments | « content/renderer/pepper_plugin_delegate_impl.cc ('k') | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698