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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 1956383003: Forwarding POST body into renderer after a cross-site transfer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased on top of separate CL that moves POST body to CommonNavigationParams. Created 4 years, 7 months 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
OLDNEW
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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 479
480 // Treat the last URL in the chain as the destination and the remainder as 480 // Treat the last URL in the chain as the destination and the remainder as
481 // the redirect chain. 481 // the redirect chain.
482 CHECK(transfer_url_chain.size()); 482 CHECK(transfer_url_chain.size());
483 GURL transfer_url = transfer_url_chain.back(); 483 GURL transfer_url = transfer_url_chain.back();
484 std::vector<GURL> rest_of_chain = transfer_url_chain; 484 std::vector<GURL> rest_of_chain = transfer_url_chain;
485 rest_of_chain.pop_back(); 485 rest_of_chain.pop_back();
486 486
487 transferring_render_frame_host->frame_tree_node() 487 transferring_render_frame_host->frame_tree_node()
488 ->navigator() 488 ->navigator()
489 ->RequestTransferURL(transferring_render_frame_host, transfer_url, 489 ->RequestTransferURL(
490 nullptr, rest_of_chain, referrer, page_transition, 490 transferring_render_frame_host, transfer_url, nullptr, rest_of_chain,
491 global_request_id, should_replace_current_entry); 491 referrer, page_transition, global_request_id,
492 should_replace_current_entry, transfer_navigation_handle_->method(),
493 transfer_navigation_handle_->resource_request_body());
492 494
493 // The transferring request was only needed during the RequestTransferURL 495 // The transferring request was only needed during the RequestTransferURL
494 // call, so it is safe to clear at this point. 496 // call, so it is safe to clear at this point.
495 cross_site_transferring_request_.reset(); 497 cross_site_transferring_request_.reset();
496 498
497 // If the navigation continued, the NavigationHandle should have been 499 // If the navigation continued, the NavigationHandle should have been
498 // transfered to a RenderFrameHost. In the other cases, it should be cleared. 500 // transfered to a RenderFrameHost. In the other cases, it should be cleared.
499 transfer_navigation_handle_.reset(); 501 transfer_navigation_handle_.reset();
500 502
501 // If the navigation in the new renderer did not start, inform the 503 // If the navigation in the new renderer did not start, inform the
(...skipping 2065 matching lines...) Expand 10 before | Expand all | Expand 10 after
2567 resolved_url)) { 2569 resolved_url)) {
2568 DCHECK(!dest_instance || 2570 DCHECK(!dest_instance ||
2569 dest_instance == render_frame_host_->GetSiteInstance()); 2571 dest_instance == render_frame_host_->GetSiteInstance());
2570 return false; 2572 return false;
2571 } 2573 }
2572 2574
2573 return true; 2575 return true;
2574 } 2576 }
2575 2577
2576 } // namespace content 2578 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698