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

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

Issue 917043004: Mark error pages as such on Ctrl-Shift-T reload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove stale comment. Created 5 years, 10 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/navigation_controller_impl.cc
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index 5c3f046e78f3aa954f1d220fb08fdcc5a0222ccb..313847761b4577459eaabf25de15427d3edfbd1a 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -1126,6 +1126,8 @@ void NavigationControllerImpl::RendererDidNavigateToExistingPage(
NavigationEntryImpl* entry = entries_[entry_index].get();
// The URL may have changed due to redirects.
+ entry->set_page_type(params.url_is_unreachable ? PAGE_TYPE_ERROR
+ : PAGE_TYPE_NORMAL);
entry->SetURL(params.url);
entry->SetReferrer(params.referrer);
if (entry->update_virtual_url_with_url())
@@ -1178,6 +1180,8 @@ void NavigationControllerImpl::RendererDidNavigateToSamePage(
existing_entry->set_unique_id(pending_entry_->GetUniqueID());
// The URL may have changed due to redirects.
+ existing_entry->set_page_type(params.url_is_unreachable ? PAGE_TYPE_ERROR
+ : PAGE_TYPE_NORMAL);
if (existing_entry->update_virtual_url_with_url())
UpdateVirtualURLToURL(existing_entry, params.url);
existing_entry->SetURL(params.url);
@@ -1204,6 +1208,9 @@ void NavigationControllerImpl::RendererDidNavigateInPage(
// entry and it will be the same page as the new navigation (minus the
// reference fragments, of course). We'll update the URL of the existing
// entry without pruning the forward history.
+ existing_entry->set_page_type(params.url_is_unreachable ? PAGE_TYPE_ERROR
+ : PAGE_TYPE_NORMAL);
+
Charlie Reis 2015/02/18 23:53:04 nit: No blank line.
wjmaclean 2015/02/19 13:24:38 Done.
existing_entry->SetURL(params.url);
if (existing_entry->update_virtual_url_with_url())
UpdateVirtualURLToURL(existing_entry, params.url);

Powered by Google App Engine
This is Rietveld 408576698