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

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: 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
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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 void NavigatorImpl::RequestTransferURL( 723 void NavigatorImpl::RequestTransferURL(
724 RenderFrameHostImpl* render_frame_host, 724 RenderFrameHostImpl* render_frame_host,
725 const GURL& url, 725 const GURL& url,
726 SiteInstance* source_site_instance, 726 SiteInstance* source_site_instance,
727 const std::vector<GURL>& redirect_chain, 727 const std::vector<GURL>& redirect_chain,
728 const Referrer& referrer, 728 const Referrer& referrer,
729 ui::PageTransition page_transition, 729 ui::PageTransition page_transition,
730 const GlobalRequestID& transferred_global_request_id, 730 const GlobalRequestID& transferred_global_request_id,
731 bool should_replace_current_entry, 731 bool should_replace_current_entry,
732 const std::string& method, 732 const std::string& method,
733 scoped_refptr<ResourceRequestBody> post_body) { 733 scoped_refptr<ResourceRequestBodyImpl> post_body) {
734 // |method != "POST"| should imply absence of |post_body|. 734 // |method != "POST"| should imply absence of |post_body|.
735 if (method != "POST" && post_body) { 735 if (method != "POST" && post_body) {
736 NOTREACHED(); 736 NOTREACHED();
737 post_body = nullptr; 737 post_body = nullptr;
738 } 738 }
739 739
740 // This call only makes sense for subframes if OOPIFs are possible. 740 // This call only makes sense for subframes if OOPIFs are possible.
741 DCHECK(!render_frame_host->GetParent() || 741 DCHECK(!render_frame_host->GetParent() ||
742 SiteIsolationPolicy::AreCrossProcessFramesPossible()); 742 SiteIsolationPolicy::AreCrossProcessFramesPossible());
743 743
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 if (pending_entry != controller_->GetVisibleEntry() || 1173 if (pending_entry != controller_->GetVisibleEntry() ||
1174 !should_preserve_entry) { 1174 !should_preserve_entry) {
1175 controller_->DiscardPendingEntry(true); 1175 controller_->DiscardPendingEntry(true);
1176 1176
1177 // Also force the UI to refresh. 1177 // Also force the UI to refresh.
1178 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 1178 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
1179 } 1179 }
1180 } 1180 }
1181 1181
1182 } // namespace content 1182 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698