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

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: Extracted a shared NavigationEntryImpl::ConstructResourceRequestBody. 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(transferring_render_frame_host, transfer_url,
485 nullptr, rest_of_chain, referrer, page_transition, 485 nullptr, rest_of_chain, referrer, page_transition,
486 global_request_id, should_replace_current_entry); 486 global_request_id, should_replace_current_entry,
487 transfer_navigation_handle_.get());
487 488
488 // The transferring request was only needed during the RequestTransferURL 489 // The transferring request was only needed during the RequestTransferURL
489 // call, so it is safe to clear at this point. 490 // call, so it is safe to clear at this point.
490 cross_site_transferring_request_.reset(); 491 cross_site_transferring_request_.reset();
491 492
492 // If the navigation continued, the NavigationHandle should have been 493 // If the navigation continued, the NavigationHandle should have been
493 // transfered to a RenderFrameHost. In the other cases, it should be cleared. 494 // transfered to a RenderFrameHost. In the other cases, it should be cleared.
494 transfer_navigation_handle_.reset(); 495 transfer_navigation_handle_.reset();
495 496
496 // If the navigation in the new renderer did not start, inform the 497 // If the navigation in the new renderer did not start, inform the
(...skipping 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after
2565 resolved_url)) { 2566 resolved_url)) {
2566 DCHECK(!dest_instance || 2567 DCHECK(!dest_instance ||
2567 dest_instance == render_frame_host_->GetSiteInstance()); 2568 dest_instance == render_frame_host_->GetSiteInstance());
2568 return false; 2569 return false;
2569 } 2570 }
2570 2571
2571 return true; 2572 return true;
2572 } 2573 }
2573 2574
2574 } // namespace content 2575 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698