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

Unified Diff: components/error_page/common/localized_error.cc

Issue 2574573002: Merge to M56: Do not show "DOWNLOAD PAGE LATER" button if RELOAD button is shown (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/error_page/common/localized_error.cc
diff --git a/components/error_page/common/localized_error.cc b/components/error_page/common/localized_error.cc
index 1d05b90b92b2869b9fc765af7d9d7027bcf82b45..825a9d80461e67d9c2cc43ec60fea325865714da 100644
--- a/components/error_page/common/localized_error.cc
+++ b/components/error_page/common/localized_error.cc
@@ -945,7 +945,13 @@ void LocalizedError::GetStrings(
// Add the reload suggestion, if needed for pages that didn't come
// from a post.
+#if defined(OS_ANDROID)
+ bool reload_visible = false;
+#endif // defined(OS_ANDROID)
if (params->suggest_reload && !is_post) {
+#if defined(OS_ANDROID)
+ reload_visible = true;
+#endif // defined(OS_ANDROID)
base::DictionaryValue* reload_button = new base::DictionaryValue;
reload_button->SetString(
"msg", l10n_util::GetStringUTF16(IDS_ERRORPAGES_BUTTON_RELOAD));
@@ -998,8 +1004,8 @@ void LocalizedError::GetStrings(
}
#if defined(OS_ANDROID)
- if (!show_saved_copy_visible && !is_incognito &&
- failed_url.SchemeIsHTTPOrHTTPS() &&
+ if (!reload_visible && !show_saved_copy_visible && !is_incognito &&
+ failed_url.is_valid() && failed_url.SchemeIsHTTPOrHTTPS() &&
offline_pages::IsOfflinePagesAsyncDownloadEnabled()) {
std::unique_ptr<base::DictionaryValue> download_button =
base::MakeUnique<base::DictionaryValue>();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698