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

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

Issue 2038813003: Making ResourceRequestBody part of //content's public API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 4 years, 6 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
« no previous file with comments | « content/browser/frame_host/navigator_impl.h ('k') | content/browser/loader/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 } 265 }
266 } 266 }
267 267
268 bool NavigatorImpl::NavigateToEntry( 268 bool NavigatorImpl::NavigateToEntry(
269 FrameTreeNode* frame_tree_node, 269 FrameTreeNode* frame_tree_node,
270 const FrameNavigationEntry& frame_entry, 270 const FrameNavigationEntry& frame_entry,
271 const NavigationEntryImpl& entry, 271 const NavigationEntryImpl& entry,
272 NavigationController::ReloadType reload_type, 272 NavigationController::ReloadType reload_type,
273 bool is_same_document_history_load, 273 bool is_same_document_history_load,
274 bool is_pending_entry, 274 bool is_pending_entry,
275 const scoped_refptr<ResourceRequestBody>& post_body) { 275 const scoped_refptr<ResourceRequestBodyImpl>& post_body) {
276 TRACE_EVENT0("browser,navigation", "NavigatorImpl::NavigateToEntry"); 276 TRACE_EVENT0("browser,navigation", "NavigatorImpl::NavigateToEntry");
277 277
278 GURL dest_url = frame_entry.url(); 278 GURL dest_url = frame_entry.url();
279 Referrer dest_referrer = frame_entry.referrer(); 279 Referrer dest_referrer = frame_entry.referrer();
280 if (reload_type == 280 if (reload_type ==
281 NavigationController::ReloadType::RELOAD_ORIGINAL_REQUEST_URL && 281 NavigationController::ReloadType::RELOAD_ORIGINAL_REQUEST_URL &&
282 entry.GetOriginalRequestURL().is_valid() && !entry.GetHasPostData()) { 282 entry.GetOriginalRequestURL().is_valid() && !entry.GetHasPostData()) {
283 // We may have been redirected when navigating to the current URL. 283 // We may have been redirected when navigating to the current URL.
284 // Use the URL the user originally intended to visit, if it's valid and if a 284 // Use the URL the user originally intended to visit, if it's valid and if a
285 // POST wasn't involved; the latter case avoids issues with sending data to 285 // POST wasn't involved; the latter case avoids issues with sending data to
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 void NavigatorImpl::RequestTransferURL( 724 void NavigatorImpl::RequestTransferURL(
725 RenderFrameHostImpl* render_frame_host, 725 RenderFrameHostImpl* render_frame_host,
726 const GURL& url, 726 const GURL& url,
727 SiteInstance* source_site_instance, 727 SiteInstance* source_site_instance,
728 const std::vector<GURL>& redirect_chain, 728 const std::vector<GURL>& redirect_chain,
729 const Referrer& referrer, 729 const Referrer& referrer,
730 ui::PageTransition page_transition, 730 ui::PageTransition page_transition,
731 const GlobalRequestID& transferred_global_request_id, 731 const GlobalRequestID& transferred_global_request_id,
732 bool should_replace_current_entry, 732 bool should_replace_current_entry,
733 const std::string& method, 733 const std::string& method,
734 scoped_refptr<ResourceRequestBody> post_body) { 734 scoped_refptr<ResourceRequestBodyImpl> post_body) {
735 // |method != "POST"| should imply absence of |post_body|. 735 // |method != "POST"| should imply absence of |post_body|.
736 if (method != "POST" && post_body) { 736 if (method != "POST" && post_body) {
737 NOTREACHED(); 737 NOTREACHED();
738 post_body = nullptr; 738 post_body = nullptr;
739 } 739 }
740 740
741 // This call only makes sense for subframes if OOPIFs are possible. 741 // This call only makes sense for subframes if OOPIFs are possible.
742 DCHECK(!render_frame_host->GetParent() || 742 DCHECK(!render_frame_host->GetParent() ||
743 SiteIsolationPolicy::AreCrossProcessFramesPossible()); 743 SiteIsolationPolicy::AreCrossProcessFramesPossible());
744 744
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 if (pending_entry != controller_->GetVisibleEntry() || 1174 if (pending_entry != controller_->GetVisibleEntry() ||
1175 !should_preserve_entry) { 1175 !should_preserve_entry) {
1176 controller_->DiscardPendingEntry(true); 1176 controller_->DiscardPendingEntry(true);
1177 1177
1178 // Also force the UI to refresh. 1178 // Also force the UI to refresh.
1179 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 1179 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
1180 } 1180 }
1181 } 1181 }
1182 1182
1183 } // namespace content 1183 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigator_impl.h ('k') | content/browser/loader/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698