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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 | 480 |
481 // Treat the last URL in the chain as the destination and the remainder as | 481 // Treat the last URL in the chain as the destination and the remainder as |
482 // the redirect chain. | 482 // the redirect chain. |
483 CHECK(transfer_url_chain.size()); | 483 CHECK(transfer_url_chain.size()); |
484 GURL transfer_url = transfer_url_chain.back(); | 484 GURL transfer_url = transfer_url_chain.back(); |
485 std::vector<GURL> rest_of_chain = transfer_url_chain; | 485 std::vector<GURL> rest_of_chain = transfer_url_chain; |
486 rest_of_chain.pop_back(); | 486 rest_of_chain.pop_back(); |
487 | 487 |
488 transferring_render_frame_host->frame_tree_node() | 488 transferring_render_frame_host->frame_tree_node() |
489 ->navigator() | 489 ->navigator() |
490 ->RequestTransferURL(transferring_render_frame_host, transfer_url, | 490 ->RequestTransferURL( |
491 nullptr, rest_of_chain, referrer, page_transition, | 491 transferring_render_frame_host, transfer_url, nullptr, rest_of_chain, |
492 global_request_id, should_replace_current_entry); | 492 referrer, page_transition, global_request_id, |
| 493 should_replace_current_entry, |
| 494 transfer_navigation_handle_->IsPost() ? "POST" : "GET", |
| 495 transfer_navigation_handle_->resource_request_body()); |
493 | 496 |
494 // The transferring request was only needed during the RequestTransferURL | 497 // The transferring request was only needed during the RequestTransferURL |
495 // call, so it is safe to clear at this point. | 498 // call, so it is safe to clear at this point. |
496 cross_site_transferring_request_.reset(); | 499 cross_site_transferring_request_.reset(); |
497 | 500 |
498 // If the navigation continued, the NavigationHandle should have been | 501 // If the navigation continued, the NavigationHandle should have been |
499 // transfered to a RenderFrameHost. In the other cases, it should be cleared. | 502 // transfered to a RenderFrameHost. In the other cases, it should be cleared. |
500 transfer_navigation_handle_.reset(); | 503 transfer_navigation_handle_.reset(); |
501 | 504 |
502 // If the navigation in the new renderer did not start, inform the | 505 // If the navigation in the new renderer did not start, inform the |
(...skipping 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2599 resolved_url)) { | 2602 resolved_url)) { |
2600 DCHECK(!dest_instance || | 2603 DCHECK(!dest_instance || |
2601 dest_instance == render_frame_host_->GetSiteInstance()); | 2604 dest_instance == render_frame_host_->GetSiteInstance()); |
2602 return false; | 2605 return false; |
2603 } | 2606 } |
2604 | 2607 |
2605 return true; | 2608 return true; |
2606 } | 2609 } |
2607 | 2610 |
2608 } // namespace content | 2611 } // namespace content |
OLD | NEW |