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

Side by Side Diff: ipc/ipc_channel_proxy.cc

Issue 133903006: Remove an outdated comment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « no previous file | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 5 #include "base/bind.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // Called on the IPC::Channel thread 86 // Called on the IPC::Channel thread
87 bool ChannelProxy::Context::OnMessageReceived(const Message& message) { 87 bool ChannelProxy::Context::OnMessageReceived(const Message& message) {
88 // First give a chance to the filters to process this message. 88 // First give a chance to the filters to process this message.
89 if (!TryFilters(message)) 89 if (!TryFilters(message))
90 OnMessageReceivedNoFilter(message); 90 OnMessageReceivedNoFilter(message);
91 return true; 91 return true;
92 } 92 }
93 93
94 // Called on the IPC::Channel thread 94 // Called on the IPC::Channel thread
95 bool ChannelProxy::Context::OnMessageReceivedNoFilter(const Message& message) { 95 bool ChannelProxy::Context::OnMessageReceivedNoFilter(const Message& message) {
96 // NOTE: This code relies on the listener's message loop not going away while
97 // this thread is active. That should be a reasonable assumption, but it
98 // feels risky. We may want to invent some more indirect way of referring to
99 // a MessageLoop if this becomes a problem.
100 listener_task_runner_->PostTask( 96 listener_task_runner_->PostTask(
101 FROM_HERE, base::Bind(&Context::OnDispatchMessage, this, message)); 97 FROM_HERE, base::Bind(&Context::OnDispatchMessage, this, message));
102 return true; 98 return true;
103 } 99 }
104 100
105 // Called on the IPC::Channel thread 101 // Called on the IPC::Channel thread
106 void ChannelProxy::Context::OnChannelConnected(int32 peer_pid) { 102 void ChannelProxy::Context::OnChannelConnected(int32 peer_pid) {
107 // Add any pending filters. This avoids a race condition where someone 103 // Add any pending filters. This avoids a race condition where someone
108 // creates a ChannelProxy, calls AddFilter, and then right after starts the 104 // creates a ChannelProxy, calls AddFilter, and then right after starts the
109 // peer process. The IO thread could receive a message before the task to add 105 // peer process. The IO thread could receive a message before the task to add
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 Channel* channel = context_.get()->channel_.get(); 411 Channel* channel = context_.get()->channel_.get();
416 // Channel must have been created first. 412 // Channel must have been created first.
417 DCHECK(channel) << context_.get()->channel_id_; 413 DCHECK(channel) << context_.get()->channel_id_;
418 return channel->GetPeerEuid(peer_euid); 414 return channel->GetPeerEuid(peer_euid);
419 } 415 }
420 #endif 416 #endif
421 417
422 //----------------------------------------------------------------------------- 418 //-----------------------------------------------------------------------------
423 419
424 } // namespace IPC 420 } // namespace IPC
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698