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

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

Issue 2475693002: Do not reset NavigationHandle when navigating same-page (Closed)
Patch Set: Rebase + removed DCHECK Created 4 years, 1 month 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
Index: content/browser/frame_host/interstitial_page_navigator_impl.cc
diff --git a/content/browser/frame_host/interstitial_page_navigator_impl.cc b/content/browser/frame_host/interstitial_page_navigator_impl.cc
index a19deefa127366eb78f867e56bc8c4c4d7fd73b0..3c3c7ac0cf396d68b764aba48f9b8007cd56410c 100644
--- a/content/browser/frame_host/interstitial_page_navigator_impl.cc
+++ b/content/browser/frame_host/interstitial_page_navigator_impl.cc
@@ -32,25 +32,25 @@ void InterstitialPageNavigatorImpl::DidStartProvisionalLoad(
const GURL& url,
const base::TimeTicks& navigation_start) {
// The interstitial page should only navigate once.
- DCHECK(!navigation_handle_.get());
- navigation_handle_ =
+ DCHECK(!render_frame_host->navigation_handle());
+ render_frame_host->SetNavigationHandle(
NavigationHandleImpl::Create(url, render_frame_host->frame_tree_node(),
false, // is_renderer_initiated
false, // is_synchronous
false, // is_srcdoc
navigation_start,
- 0, // pending_nav_entry_id
- false); // started_in_context_menu
+ 0, // pending_nav_entry_id
+ false) // started_in_context_menu
+ );
}
void InterstitialPageNavigatorImpl::DidNavigate(
RenderFrameHostImpl* render_frame_host,
- const FrameHostMsg_DidCommitProvisionalLoad_Params& input_params) {
- if (navigation_handle_) {
- navigation_handle_->DidCommitNavigation(input_params, false,
- render_frame_host);
- navigation_handle_.reset();
- }
+ const FrameHostMsg_DidCommitProvisionalLoad_Params& input_params,
+ std::unique_ptr<NavigationHandleImpl> navigation_handle) {
+ navigation_handle->DidCommitNavigation(input_params, false,
+ render_frame_host);
+ navigation_handle.reset();
// TODO(nasko): Move implementation here, but for the time being call out
// to the interstitial page code.
@@ -58,10 +58,4 @@ void InterstitialPageNavigatorImpl::DidNavigate(
input_params);
}
-NavigationHandleImpl*
-InterstitialPageNavigatorImpl::GetNavigationHandleForFrameHost(
- RenderFrameHostImpl* render_frame_host) {
- return navigation_handle_.get();
-}
-
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698