OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/frame_host/render_frame_host_manager.h" | 5 #include "content/browser/frame_host/render_frame_host_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 // Make sure this is from our current RFH, and that we have a pending | 320 // Make sure this is from our current RFH, and that we have a pending |
321 // navigation from OnCrossSiteResponse. (There may be no pending navigation | 321 // navigation from OnCrossSiteResponse. (There may be no pending navigation |
322 // for data URLs that don't make network requests, for example.) If not, | 322 // for data URLs that don't make network requests, for example.) If not, |
323 // just return early and ignore. | 323 // just return early and ignore. |
324 if (render_frame_host != render_frame_host_ || !pending_nav_params_.get()) { | 324 if (render_frame_host != render_frame_host_ || !pending_nav_params_.get()) { |
325 pending_nav_params_.reset(); | 325 pending_nav_params_.reset(); |
326 return; | 326 return; |
327 } | 327 } |
328 | 328 |
329 // Sanity check that this is for the correct frame. | 329 // Sanity check that this is for the correct frame. |
330 DCHECK_EQ(frame_tree_node_->frame_id(), pending_nav_params_->frame_id); | 330 DCHECK_EQ(frame_tree_node_->current_frame_host()->GetRoutingID(), |
| 331 pending_nav_params_->frame_id); |
| 332 DCHECK_EQ(frame_tree_node_->current_frame_host()->GetProcess()->GetID(), |
| 333 pending_nav_params_->global_request_id.child_id); |
331 | 334 |
332 // Now that the unload handler has run, we need to either initiate the | 335 // Now that the unload handler has run, we need to either initiate the |
333 // pending transfer (if there is one) or resume the paused response (if not). | 336 // pending transfer (if there is one) or resume the paused response (if not). |
334 // TODO(creis): The blank swapped out page is visible during this time, but | 337 // TODO(creis): The blank swapped out page is visible during this time, but |
335 // we can shorten this by delivering the response directly, rather than | 338 // we can shorten this by delivering the response directly, rather than |
336 // forcing an identical request to be made. | 339 // forcing an identical request to be made. |
337 if (pending_nav_params_->cross_site_transferring_request) { | 340 if (pending_nav_params_->cross_site_transferring_request) { |
338 // Treat the last URL in the chain as the destination and the remainder as | 341 // Treat the last URL in the chain as the destination and the remainder as |
339 // the redirect chain. | 342 // the redirect chain. |
340 CHECK(pending_nav_params_->transfer_url_chain.size()); | 343 CHECK(pending_nav_params_->transfer_url_chain.size()); |
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1453 SiteInstance* instance) const { | 1456 SiteInstance* instance) const { |
1454 RenderFrameHostMap::const_iterator iter = | 1457 RenderFrameHostMap::const_iterator iter = |
1455 swapped_out_hosts_.find(instance->GetId()); | 1458 swapped_out_hosts_.find(instance->GetId()); |
1456 if (iter != swapped_out_hosts_.end()) | 1459 if (iter != swapped_out_hosts_.end()) |
1457 return iter->second; | 1460 return iter->second; |
1458 | 1461 |
1459 return NULL; | 1462 return NULL; |
1460 } | 1463 } |
1461 | 1464 |
1462 } // namespace content | 1465 } // namespace content |
OLD | NEW |