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

Unified Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 818853005: Store NavigationEntryImpl data into NavigationRequest for later usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor change rebase. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index 828270732bfb47de7c34978cfecd90ec1c5e9916..32fa3b2b5d516c259beb6fef5f546b2dc2496baf 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -17,6 +17,7 @@
#include "content/browser/frame_host/interstitial_page_impl.h"
#include "content/browser/frame_host/navigation_controller_impl.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
+#include "content/browser/frame_host/navigation_request.h"
#include "content/browser/frame_host/navigator.h"
#include "content/browser/frame_host/render_frame_host_factory.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
@@ -650,8 +651,7 @@ void RenderFrameHostManager::ResetProxyHosts() {
}
// PlzNavigate
-void RenderFrameHostManager::BeginNavigation(
- const CommonNavigationParams& common_params) {
+void RenderFrameHostManager::BeginNavigation(const NavigationRequest& request) {
CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserSideNavigation));
// Clean up any state in case there's an ongoing navigation.
@@ -659,24 +659,23 @@ void RenderFrameHostManager::BeginNavigation(
// navigations.
CleanUpNavigation();
- RenderFrameHostImpl* dest_rfh =
- GetFrameHostForNavigation(common_params.url, common_params.transition);
+ RenderFrameHostImpl* dest_rfh = GetFrameHostForNavigation(request);
DCHECK(dest_rfh);
}
// PlzNavigate
RenderFrameHostImpl* RenderFrameHostManager::GetFrameHostForNavigation(
- const GURL& url,
- ui::PageTransition transition) {
+ const NavigationRequest& request) {
CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserSideNavigation));
SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance();
- // TODO(carlosk): Replace the default values with the right ones for
- // source_instance, dest_instance, dest_is_restore, dest_is_view_source_mode.
scoped_refptr<SiteInstance> dest_site_instance = GetSiteInstanceForNavigation(
- url, nullptr, nullptr, transition, false, false);
+ request.common_params().url, request.source_site_instance(),
+ request.dest_site_instance(), request.common_params().transition,
+ request.restore_type() != NavigationEntryImpl::RESTORE_NONE,
+ request.is_view_source());
// The appropriate RenderFrameHost to commit the navigation.
RenderFrameHostImpl* navigation_rfh = nullptr;
@@ -710,10 +709,9 @@ RenderFrameHostImpl* RenderFrameHostManager::GetFrameHostForNavigation(
speculative_render_frame_host_->GetSiteInstance() !=
dest_site_instance.get()) {
CleanUpNavigation();
- // TODO(carlosk): Replace the binding value with the right one.
bool success = CreateSpeculativeRenderFrameHost(
- url, current_site_instance, dest_site_instance.get(),
- NavigationEntryImpl::kInvalidBindings);
+ request.common_params().url, current_site_instance,
+ dest_site_instance.get(), request.bindings());
DCHECK(success);
}
DCHECK(speculative_render_frame_host_);
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698