summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-16 22:12:39 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-16 22:12:39 +0000
commit413889301cc865ec50f36eb9f278669996b5679c (patch)
tree5ec087edf850cda46053988c956f4aad321e7685 /ipc
parent1ac7bbfd01b96709e44b6800668f0af034ffea0f (diff)
downloadchromium_src-413889301cc865ec50f36eb9f278669996b5679c.zip
chromium_src-413889301cc865ec50f36eb9f278669996b5679c.tar.gz
chromium_src-413889301cc865ec50f36eb9f278669996b5679c.tar.bz2
ipc: rename a variable to make code clearer
It took me a while to understand this function because filters_ and filters represented two very different things. Review URL: http://codereview.chromium.org/7670006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97037 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_channel_proxy.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/ipc/ipc_channel_proxy.cc b/ipc/ipc_channel_proxy.cc
index da3da24..dc990c2 100644
--- a/ipc/ipc_channel_proxy.cc
+++ b/ipc/ipc_channel_proxy.cc
@@ -194,22 +194,22 @@ void ChannelProxy::Context::OnSendMessage(Message* message) {
// Called on the IPC::Channel thread
void ChannelProxy::Context::OnAddFilter() {
- std::vector<scoped_refptr<MessageFilter> > filters;
+ std::vector<scoped_refptr<MessageFilter> > new_filters;
{
base::AutoLock auto_lock(pending_filters_lock_);
- filters.swap(pending_filters_);
+ new_filters.swap(pending_filters_);
}
- for (size_t i = 0; i < filters.size(); ++i) {
- filters_.push_back(filters[i]);
+ for (size_t i = 0; i < new_filters.size(); ++i) {
+ filters_.push_back(new_filters[i]);
// If the channel has already been created, then we need to send this
// message so that the filter gets access to the Channel.
if (channel_.get())
- filters[i]->OnFilterAdded(channel_.get());
- // Ditto for the peer process id.
+ new_filters[i]->OnFilterAdded(channel_.get());
+ // Ditto for if the channel has been connected.
if (peer_pid_)
- filters[i]->OnChannelConnected(peer_pid_);
+ new_filters[i]->OnChannelConnected(peer_pid_);
}
}