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

Side by Side Diff: ipc/ipc_channel_proxy.cc

Issue 2497843002: Revert of Ensure clean up functions of MessageFilter are paired with their initialization functions (Closed)
Patch Set: Created 4 years, 1 month 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
« 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 "ipc/ipc_channel_proxy.h" 5 #include "ipc/ipc_channel_proxy.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // TODO(pkasting): Remove ScopedTracker below once crbug.com/477117 is fixed. 205 // TODO(pkasting): Remove ScopedTracker below once crbug.com/477117 is fixed.
206 tracked_objects::ScopedTracker tracking_profile( 206 tracked_objects::ScopedTracker tracking_profile(
207 FROM_HERE_WITH_EXPLICIT_FUNCTION( 207 FROM_HERE_WITH_EXPLICIT_FUNCTION(
208 "477117 ChannelProxy::Context::OnChannelClosed")); 208 "477117 ChannelProxy::Context::OnChannelClosed"));
209 // It's okay for IPC::ChannelProxy::Close to be called more than once, which 209 // It's okay for IPC::ChannelProxy::Close to be called more than once, which
210 // would result in this branch being taken. 210 // would result in this branch being taken.
211 if (!channel_) 211 if (!channel_)
212 return; 212 return;
213 213
214 for (auto& filter : pending_filters_) { 214 for (auto& filter : pending_filters_) {
215 // OnFilterAdded and OnChannelConnected have not been called on
216 // MessageFilters in |pending_filters_|. Call them here to match
217 // OnChannelClosing and OnFilterRemoved.
218 filter->OnFilterAdded(nullptr);
219 filter->OnChannelConnected(peer_pid_);
220 filter->OnChannelClosing(); 215 filter->OnChannelClosing();
221 filter->OnFilterRemoved(); 216 filter->OnFilterRemoved();
222 } 217 }
223 for (auto& filter : filters_) { 218 for (auto& filter : filters_) {
224 filter->OnChannelClosing(); 219 filter->OnChannelClosing();
225 filter->OnFilterRemoved(); 220 filter->OnFilterRemoved();
226 } 221 }
227 222
228 // We don't need the filters anymore. 223 // We don't need the filters anymore.
229 message_filter_router_->Clear(); 224 message_filter_router_->Clear();
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 CHECK(!did_init_); 628 CHECK(!did_init_);
634 context()->set_attachment_broker_endpoint(is_attachment_broker_endpoint()); 629 context()->set_attachment_broker_endpoint(is_attachment_broker_endpoint());
635 } 630 }
636 631
637 void ChannelProxy::OnChannelInit() { 632 void ChannelProxy::OnChannelInit() {
638 } 633 }
639 634
640 //----------------------------------------------------------------------------- 635 //-----------------------------------------------------------------------------
641 636
642 } // namespace IPC 637 } // 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