| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 | 474 |
| 475 // Treat the last URL in the chain as the destination and the remainder as | 475 // Treat the last URL in the chain as the destination and the remainder as |
| 476 // the redirect chain. | 476 // the redirect chain. |
| 477 CHECK(transfer_url_chain.size()); | 477 CHECK(transfer_url_chain.size()); |
| 478 GURL transfer_url = transfer_url_chain.back(); | 478 GURL transfer_url = transfer_url_chain.back(); |
| 479 std::vector<GURL> rest_of_chain = transfer_url_chain; | 479 std::vector<GURL> rest_of_chain = transfer_url_chain; |
| 480 rest_of_chain.pop_back(); | 480 rest_of_chain.pop_back(); |
| 481 | 481 |
| 482 transferring_render_frame_host->frame_tree_node() | 482 transferring_render_frame_host->frame_tree_node() |
| 483 ->navigator() | 483 ->navigator() |
| 484 ->RequestTransferURL(transferring_render_frame_host, transfer_url, | 484 ->RequestTransferURL( |
| 485 nullptr, rest_of_chain, referrer, page_transition, | 485 transferring_render_frame_host, transfer_url, nullptr, rest_of_chain, |
| 486 global_request_id, should_replace_current_entry); | 486 referrer, page_transition, global_request_id, |
| 487 should_replace_current_entry, |
| 488 transfer_navigation_handle_->resource_request_body()); |
| 487 | 489 |
| 488 // The transferring request was only needed during the RequestTransferURL | 490 // The transferring request was only needed during the RequestTransferURL |
| 489 // call, so it is safe to clear at this point. | 491 // call, so it is safe to clear at this point. |
| 490 cross_site_transferring_request_.reset(); | 492 cross_site_transferring_request_.reset(); |
| 491 | 493 |
| 492 // If the navigation continued, the NavigationHandle should have been | 494 // If the navigation continued, the NavigationHandle should have been |
| 493 // transfered to a RenderFrameHost. In the other cases, it should be cleared. | 495 // transfered to a RenderFrameHost. In the other cases, it should be cleared. |
| 494 transfer_navigation_handle_.reset(); | 496 transfer_navigation_handle_.reset(); |
| 495 | 497 |
| 496 // If the navigation in the new renderer did not start, inform the | 498 // If the navigation in the new renderer did not start, inform the |
| (...skipping 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2565 resolved_url)) { | 2567 resolved_url)) { |
| 2566 DCHECK(!dest_instance || | 2568 DCHECK(!dest_instance || |
| 2567 dest_instance == render_frame_host_->GetSiteInstance()); | 2569 dest_instance == render_frame_host_->GetSiteInstance()); |
| 2568 return false; | 2570 return false; |
| 2569 } | 2571 } |
| 2570 | 2572 |
| 2571 return true; | 2573 return true; |
| 2572 } | 2574 } |
| 2573 | 2575 |
| 2574 } // namespace content | 2576 } // namespace content |
| OLD | NEW |