OLD | NEW |
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 Loading... |
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_); |
215 filter->OnChannelClosing(); | 220 filter->OnChannelClosing(); |
216 filter->OnFilterRemoved(); | 221 filter->OnFilterRemoved(); |
217 } | 222 } |
218 for (auto& filter : filters_) { | 223 for (auto& filter : filters_) { |
219 filter->OnChannelClosing(); | 224 filter->OnChannelClosing(); |
220 filter->OnFilterRemoved(); | 225 filter->OnFilterRemoved(); |
221 } | 226 } |
222 | 227 |
223 // We don't need the filters anymore. | 228 // We don't need the filters anymore. |
224 message_filter_router_->Clear(); | 229 message_filter_router_->Clear(); |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 CHECK(!did_init_); | 633 CHECK(!did_init_); |
629 context()->set_attachment_broker_endpoint(is_attachment_broker_endpoint()); | 634 context()->set_attachment_broker_endpoint(is_attachment_broker_endpoint()); |
630 } | 635 } |
631 | 636 |
632 void ChannelProxy::OnChannelInit() { | 637 void ChannelProxy::OnChannelInit() { |
633 } | 638 } |
634 | 639 |
635 //----------------------------------------------------------------------------- | 640 //----------------------------------------------------------------------------- |
636 | 641 |
637 } // namespace IPC | 642 } // namespace IPC |
OLD | NEW |