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

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

Issue 2588253002: Enable download page action for error page (Closed)
Patch Set: Fix trybots Created 4 years 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 8b257b5fa2b42ac9f24499fff870ef4f334f88c8..675e6003f171e08c9ae6d99399317bfaf4f4eae0 100644
--- a/chrome/browser/net/net_error_tab_helper.cc
+++ b/chrome/browser/net/net_error_tab_helper.cc
@@ -143,6 +143,8 @@ bool NetErrorTabHelper::OnMessageReceived(
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(NetErrorTabHelper, message)
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DownloadPageLater, DownloadPageLater)
+ IPC_MESSAGE_HANDLER(ChromeViewHostMsg_SetIsShowingDownloadButtonInErrorPage,
+ SetIsShowingDownloadButtonInErrorPage)
mmenke 2017/01/03 16:20:10 How can the browser process have a better idea of
nasko 2017/01/04 18:22:20 nit: Usually IPC handlers have an On prefix.
jianli 2017/01/06 23:46:37 Done.
jianli 2017/01/06 23:46:37 I am not sure I fully understand this comment. The
mmenke 2017/01/09 20:02:25 Sorry, I was getting net_error_tab_helper confused
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -158,6 +160,9 @@ NetErrorTabHelper::NetErrorTabHelper(WebContents* contents)
is_error_page_(false),
dns_error_active_(false),
dns_error_page_committed_(false),
+#if BUILDFLAG(ANDROID_JAVA_UI)
+ is_showing_download_button_in_error_page_(false),
+#endif // BUILDFLAG(ANDROID_JAVA_UI
nasko 2017/01/04 18:22:20 nit: Missing closing parenthesis.
jianli 2017/01/06 23:46:37 Done.
dns_probe_status_(error_page::DNS_PROBE_POSSIBLE),
weak_factory_(this) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -224,6 +229,10 @@ void NetErrorTabHelper::DownloadPageLater() {
DownloadPageLaterHelper(url);
}
+
+void NetErrorTabHelper::SetIsShowingDownloadButtonInErrorPage(bool show) {
+ is_showing_download_button_in_error_page_ = show;
+}
#endif // BUILDFLAG(ANDROID_JAVA_UI)
void NetErrorTabHelper::InitializePref(WebContents* contents) {

Powered by Google App Engine
This is Rietveld 408576698