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

Unified Diff: chrome/browser/net/net_error_tab_helper.cc

Issue 207553008: Surface button for loading stale cache copy on net error page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix incorrect spelling of iOS. Created 6 years, 8 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: chrome/browser/net/net_error_tab_helper.cc
diff --git a/chrome/browser/net/net_error_tab_helper.cc b/chrome/browser/net/net_error_tab_helper.cc
index 7112321fa1fa0f2bb550fd08eb0dd71865743930..5539703293c13b4c8a9698e7ba8ea451e99421a2 100644
--- a/chrome/browser/net/net_error_tab_helper.cc
+++ b/chrome/browser/net/net_error_tab_helper.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/net/net_error_tab_helper.h"
#include "base/bind.h"
+#include "base/logging.h"
#include "base/prefs/pref_service.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/io_thread.h"
@@ -76,6 +77,21 @@ void NetErrorTabHelper::set_state_for_testing(TestingState state) {
testing_state_ = state;
}
+void NetErrorTabHelper::DidStartNavigationToPendingEntry(
+ const GURL& url,
+ content::NavigationController::ReloadType reload_type) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+
+ if (!is_error_page_)
+ return;
+
+ // Only record reloads.
+ if (reload_type != content::NavigationController::NO_RELOAD) {
+ chrome_common_net::RecordEvent(
+ chrome_common_net::NETWORK_ERROR_PAGE_BROWSER_INITIATED_RELOAD);
+ }
+}
+
void NetErrorTabHelper::DidStartProvisionalLoadForFrame(
int64 frame_id,
int64 parent_frame_id,

Powered by Google App Engine
This is Rietveld 408576698