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

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

Issue 580133002: Update entry page type to include error pages when appropriate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fix for unit_tests Created 6 years, 3 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
Index: content/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index 384bceeafbe37a8ccaab4546a517d86c8df019d1..7f8e47c9343226b104b5cb25ea9aae27681ddeea 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -164,6 +164,8 @@ void NavigatorImpl::DidStartProvisionalLoad(
bool is_main_frame = render_frame_host->frame_tree_node()->IsMainFrame();
NavigationEntryImpl* pending_entry =
NavigationEntryImpl::FromNavigationEntry(controller_->GetPendingEntry());
+ if (pending_entry && is_error_page)
+ pending_entry->set_page_type(PAGE_TYPE_ERROR);
Charlie Reis 2014/09/22 21:43:53 I question whether we should do this on the pendin
wjmaclean 2014/09/23 18:42:38 Ooops, this was meant to be deleted.
if (is_main_frame) {
// If there is no browser-initiated pending entry for this navigation and it
// is not for the error URL, create a pending entry using the current
@@ -538,6 +540,7 @@ void NavigatorImpl::DidNavigate(
delegate_->DidCommitProvisionalLoad(render_frame_host,
params.url,
+ params.url_is_unreachable,
Charlie Reis 2014/09/22 21:43:53 Why is this needed here? I thought we only needed
wjmaclean 2014/09/23 18:42:38 I was concerned about the page-type getting reset
transition_type);
}

Powered by Google App Engine
This is Rietveld 408576698