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

Unified Diff: chrome/browser/ui/browser_commands.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: Incorporated comments. 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/ui/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index 94d132ee620cffe22210800a049917dba702d94c..814fdf6d2c40fca3cf3bae25e10c3a4891bc5c4e 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/favicon/favicon_tab_helper.h"
#include "chrome/browser/google/google_util.h"
#include "chrome/browser/lifetime/application_lifetime.h"
+#include "chrome/browser/net/net_error_tab_helper.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/prefs/incognito_mode_prefs.h"
#include "chrome/browser/profiles/profile.h"
@@ -240,6 +241,13 @@ void ReloadInternal(Browser* browser,
new_tab->UserGestureDone();
if (!new_tab->FocusLocationBarByDefault())
new_tab->GetView()->Focus();
+
+ // Notify error system for statistics.
+ chrome_browser_net::NetErrorTabHelper* net_error_tab_helper =
+ chrome_browser_net::NetErrorTabHelper::FromWebContents(new_tab);
+ if (net_error_tab_helper)
+ net_error_tab_helper->NotifyBrowserReloading();
+
if (ignore_cache)
new_tab->GetController().ReloadIgnoringCache(true);
else

Powered by Google App Engine
This is Rietveld 408576698