Network errors, hide suggestions less relevant on mobile platforms
+ Also fixes a bug where the proxy, firewall suggestion link opens an invalid URL.
BUG=591987,584615
Review URL: https://codereview.chromium.org/1786113002
Cr-Commit-Position: refs/heads/master@{#381813}
diff --git a/components/components_chromium_strings.grd b/components/components_chromium_strings.grd
index d19a9db..9ea2a3b 100644
--- a/components/components_chromium_strings.grd
+++ b/components/components_chromium_strings.grd
@@ -133,7 +133,7 @@
<release seq="1" allow_pseudo="false">
<messages fallback_to_english="true">
<!-- Network Error Pages -->
- <if expr="not is_android">
+ <if expr="not is_android and not is_ios">
<message name="IDS_ERRORPAGES_SUGGESTION_NETWORK_PREDICTION_BODY" desc="When a page fails to load, sometimes we suggest disabling predicting network actions. These are details below a header for non Android devices.">
Go to
the Chromium menu >
@@ -144,19 +144,11 @@
If this does not resolve the issue, we recommend selecting this option
again for improved performance.
</message>
- </if>
- <if expr="is_android">
- <message name="IDS_ERRORPAGES_SUGGESTION_NETWORK_PREDICTION_BODY" desc="When a page fails to load, sometimes we suggest disabling predicting network actions. These are details below a header for Android devices. Note that on devices without mobile network (3G) capability, the setting is a checkbox, while on other devices, it is a list of three items. The words _disable_ and _re-enabling_ can be used for both cases.">
- Go to the Chromium menu > Settings > (Advanced) Privacy
- and disable "Prefetch page resources."
- If this does not resolve the issue, we recommend re-enabling this option
- again for improved performance.
+ <message name="IDS_ERRORPAGES_SUGGESTION_FIREWALL_CONFIG_HEADER" desc="When a webpage fails to load, in some cases we suggest reconfiguring the firewall. This is a header above some details.">
+ Allow Chromium to access the network in your firewall or antivirus
+ settings.
</message>
</if>
- <message name="IDS_ERRORPAGES_SUGGESTION_FIREWALL_CONFIG_HEADER" desc="When a webpage fails to load, in some cases we suggest reconfiguring the firewall. This is a header above some details.">
- Allow Chromium to access the network in your firewall or antivirus
- settings.
- </message>
<message name="IDS_ERRORPAGES_SUMMARY_BLOCKED_ENROLLMENT_CHECK_PENDING" desc="Summary in the error page when the user tries to browse before the forced enrollment check has finished.">
Chromium OS hasn’t completed its initial setup.
</message>
@@ -167,10 +159,6 @@
and deselect any proxies that have been selected.
</message>
</if>
- <if expr="is_android or is_ios">
- <message name="IDS_ERRORPAGES_SUGGESTION_PROXY_DISABLE_PLATFORM" desc="Instructions for disabling use of a proxy server (leave empty for Android and iOS).">
- </message>
- </if>
<if expr="not chromeos and is_posix and not is_macosx and not is_android and not is_ios">
<message name="IDS_ERRORPAGES_SUGGESTION_PROXY_DISABLE_PLATFORM" desc="Linux instructions for disabling use of a proxy server.">
Go to
diff --git a/components/components_google_chrome_strings.grd b/components/components_google_chrome_strings.grd
index d3744a7..548cbcb 100644
--- a/components/components_google_chrome_strings.grd
+++ b/components/components_google_chrome_strings.grd
@@ -133,7 +133,7 @@
<release seq="1" allow_pseudo="false">
<messages fallback_to_english="true">
<!-- Network Error Pages -->
- <if expr="not is_android">
+ <if expr="not is_android and not is_ios">
<message name="IDS_ERRORPAGES_SUGGESTION_NETWORK_PREDICTION_BODY" desc="When a page fails to load, sometimes we suggest disabling predicting network actions. These are details below a header for non Android devices.">
Go to
the Chrome menu >
@@ -144,19 +144,11 @@
If this does not resolve the issue, we recommend selecting this option
again for improved performance.
</message>
- </if>
- <if expr="is_android">
- <message name="IDS_ERRORPAGES_SUGGESTION_NETWORK_PREDICTION_BODY" desc="When a page fails to load, sometimes we suggest disabling predicting network actions. These are details below a header for Android devices. Note that on devices without mobile network (3G) capability, the setting is a checkbox, while on other devices, it is a list of three items. The words _disable_ and _re-enabling_ can be used for both cases.">
- Go to the Chrome menu > Settings > (Advanced) Privacy
- and disable "Prefetch page resources."
- If this does not resolve the issue, we recommend re-enabling this option
- again for improved performance.
+ <message name="IDS_ERRORPAGES_SUGGESTION_FIREWALL_CONFIG_HEADER" desc="When a webpage fails to load, in some cases we suggest reconfiguring the firewall. This is a header above some details.">
+ Allow Chrome to access the network in your firewall or antivirus
+ settings.
</message>
</if>
- <message name="IDS_ERRORPAGES_SUGGESTION_FIREWALL_CONFIG_HEADER" desc="When a webpage fails to load, in some cases we suggest reconfiguring the firewall. This is a header above some details.">
- Allow Chrome to access the network in your firewall or antivirus
- settings.
- </message>
<message name="IDS_ERRORPAGES_SUMMARY_BLOCKED_ENROLLMENT_CHECK_PENDING" desc="Summary in the error page when the user tries to browse before the forced enrollment check has finished.">
Chrome OS hasn’t completed its initial setup.
</message>
@@ -167,10 +159,6 @@
and deselect any proxies that have been selected.
</message>
</if>
- <if expr="is_android or is_ios">
- <message name="IDS_ERRORPAGES_SUGGESTION_PROXY_DISABLE_PLATFORM" desc="Instructions for disabling use of a proxy server (leave empty for Android and iOS).">
- </message>
- </if>
<if expr="not chromeos and is_posix and not is_macosx and not is_android and not is_ios">
<message name="IDS_ERRORPAGES_SUGGESTION_PROXY_DISABLE_PLATFORM" desc="Linux instructions for disabling use of a proxy server.">
Go to
diff --git a/components/error_page/common/localized_error.cc b/components/error_page/common/localized_error.cc
index 80dad579..c915a77 100644
--- a/components/error_page/common/localized_error.cc
+++ b/components/error_page/common/localized_error.cc
@@ -669,6 +669,7 @@
IDS_ERRORPAGES_SUGGESTION_CHECK_CONNECTION_SUMMARY, false);
}
+#if !defined(OS_ANDROID) && !defined(OS_IOS)
if ((suggestions & SUGGEST_DNS_CONFIG) &&
(suggestions & SUGGEST_FIREWALL_CONFIG) &&
(suggestions & SUGGEST_PROXY_CONFIG)) {
@@ -690,6 +691,7 @@
DCHECK(!(suggestions & SUGGEST_FIREWALL_CONFIG));
DCHECK(!(suggestions & SUGGEST_DNS_CONFIG));
}
+#endif
if (suggestions & SUGGEST_CONTACT_ADMINISTRATOR) {
AddSingleEntryDictionaryToList(suggestions_summary_list, "summary",
@@ -773,6 +775,7 @@
IDS_ERRORPAGES_SUGGESTION_CHECK_CONNECTION_BODY, false);
}
+#if !defined(OS_ANDROID) && !defined(OS_IOS)
if (suggestions & SUGGEST_DNS_CONFIG) {
AddSuggestionDetailDictionaryToList(suggestions_details,
IDS_ERRORPAGES_SUGGESTION_DNS_CONFIG_HEADER,
@@ -810,6 +813,7 @@
suggest_proxy_config->SetString("proxyTitle",
l10n_util::GetStringUTF16(IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON));
}
+#endif
if (suggestions & SUGGEST_CONTACT_ADMINISTRATOR_STANDALONE &&
error_code == net::ERR_BLOCKED_BY_ADMINISTRATOR) {
diff --git a/components/error_page_strings.grdp b/components/error_page_strings.grdp
index 255bea18..8001b3a5 100644
--- a/components/error_page_strings.grdp
+++ b/components/error_page_strings.grdp
@@ -68,30 +68,23 @@
Check any cables and reboot any routers, modems, or other network
devices you may be using.
</message>
- <message name="IDS_ERRORPAGES_SUGGESTION_DNS_CONFIG_HEADER" desc="When a page fails to load, sometimes we suggest checking the DNS configuration. This is a header above above some details.">
- Check your DNS settings
- </message>
- <message name="IDS_ERRORPAGES_SUGGESTION_DNS_CONFIG_BODY" desc="When a page fails to load, sometimes we suggest checking the DNS configuration. This contains details below the suggestion.">
- Contact your network administrator if you're not sure what this means.
- </message>
- <message name="IDS_ERRORPAGES_SUGGESTION_NETWORK_PREDICTION_HEADER" desc="When a page fails to load, sometimes we suggest disabling predicting network actions. This is a header above some details.">
- Try disabling network prediction
- </message>
- <message name="IDS_ERRORPAGES_SUGGESTION_FIREWALL_CONFIG_BODY" desc="When a webpage fails to load, in some cases we suggest reconfiguring the firewall. This contains details below the suggestion.">
- If it is already listed as a program allowed to access the network, try
- removing it from the list and adding it again.
- </message>
- <message name="IDS_ERRORPAGES_SUGGESTION_PROXY_CONFIG_HEADER" desc="When a webpage fails to load, in some cases we suggest checking the proxy server configuration, or disabling the proxy server. This is a header above some details.">
- If you use a proxy server...
- </message>
- <if expr="is_android or is_ios">
- <message name="IDS_ERRORPAGES_SUGGESTION_PROXY_CONFIG_BODY" desc="When a webpage fails to load, in some cases we suggest checking the proxy server configuration, or disabling the proxy server. These are instructions below a header.">
- Check your proxy settings or contact your network administrator to
- make sure the proxy server is working.
- <ph name="PLATFORM_TEXT">$1<ex>Goto the wrench menu and choose Fix It.</ex></ph>
+ <if expr="not is_ios or not is_android">
+ <message name="IDS_ERRORPAGES_SUGGESTION_DNS_CONFIG_HEADER" desc="When a page fails to load, sometimes we suggest checking the DNS configuration. This is a header above above some details.">
+ Check your DNS settings
</message>
- </if>
- <if expr="not is_android and not is_ios">
+ <message name="IDS_ERRORPAGES_SUGGESTION_DNS_CONFIG_BODY" desc="When a page fails to load, sometimes we suggest checking the DNS configuration. This contains details below the suggestion.">
+ Contact your network administrator if you're not sure what this means.
+ </message>
+ <message name="IDS_ERRORPAGES_SUGGESTION_NETWORK_PREDICTION_HEADER" desc="When a page fails to load, sometimes we suggest disabling predicting network actions. This is a header above some details.">
+ Try disabling network prediction
+ </message>
+ <message name="IDS_ERRORPAGES_SUGGESTION_FIREWALL_CONFIG_BODY" desc="When a webpage fails to load, in some cases we suggest reconfiguring the firewall. This contains details below the suggestion.">
+ If it is already listed as a program allowed to access the network, try
+ removing it from the list and adding it again.
+ </message>
+ <message name="IDS_ERRORPAGES_SUGGESTION_PROXY_CONFIG_HEADER" desc="When a webpage fails to load, in some cases we suggest checking the proxy server configuration, or disabling the proxy server. This is a header above some details.">
+ If you use a proxy server...
+ </message>
<message name="IDS_ERRORPAGES_SUGGESTION_PROXY_CONFIG_BODY" desc="When a webpage fails to load, in some cases we suggest checking the proxy server configuration, or disabling the proxy server. These are instructions below a header.">
Check your proxy settings or contact your network administrator to
make sure the proxy server is working. If you don't believe you should
@@ -492,18 +485,20 @@
<message name="IDS_ERRORPAGES_SUGGESTION_CHECK_CONNECTION_SUMMARY" desc="The message displayed in a list of suggestions following a network error, suggesting the user should try checking their connnection. The suggestions list is prefixed with 'Try:'.">
Checking the connection
</message>
- <message name="IDS_ERRORPAGES_SUGGESTION_CHECK_PROXY_FIREWALL_DNS_SUMMARY" desc="The message displayed in a list of suggestions following a network error suggesting the user should try checking their proxy, firewall and DNS configuration. The suggestions list is prefixed with 'Try:'.">
- <ph name="BEGIN_LINK"><a href="#buttons" onclick="javascript:toggleHelpBox()"></ph>Checking the proxy, firewall, and DNS configuration<ph name="END_LINK"></a><ex></a></ex></ph>
- </message>
- <message name="IDS_ERRORPAGES_SUGGESTION_CHECK_FIREWALL_ANTIVIRUS_SUMMARY" desc="The message displayed in a list of suggestions following a network error suggesting the user should try checking their firewall and anti-virus configuration. The suggestions list is prefixed with 'Try:'.">
- <ph name="BEGIN_LINK"><a href="#buttons" onclick="javascript:toggleHelpBox()"></ph>Checking firewall and antivirus configurations<ph name="END_LINK"></a><ex></a></ex></ph>
- </message>
- <message name="IDS_ERRORPAGES_SUGGESTION_CHECK_PROXY_FIREWALL_SUMMARY" desc="The message displayed in a list of suggestions following a network error suggesting the user should try checking their proxy and firewall configuration. The suggestions list is prefixed with 'Try:'.">
- <ph name="BEGIN_LINK"><a href="javascript:toggleHelpBox()"></ph>Checking the proxy and the firewall<ph name="END_LINK"></a><ex></a></ex></ph>
- </message>
- <message name="IDS_ERRORPAGES_SUGGESTION_CHECK_PROXY_ADDRESS_SUMMARY" desc="The message displayed in a list of suggestions following a network error suggesting to check the proxy address. The suggestions list is prefixed with 'Try:'.">
- <ph name="BEGIN_LINK"><a href="#buttons" onclick="javascript:toggleHelpBox()"></ph>Checking the proxy address<ph name="END_LINK"></a><ex></a></ex></ph>
- </message>
+ <if expr="not is_ios or not is_android">
+ <message name="IDS_ERRORPAGES_SUGGESTION_CHECK_PROXY_FIREWALL_DNS_SUMMARY" desc="The message displayed in a list of suggestions following a network error suggesting the user should try checking their proxy, firewall and DNS configuration. The suggestions list is prefixed with 'Try:'.">
+ <ph name="BEGIN_LINK"><a href="#buttons" onclick="toggleHelpBox()"></ph>Checking the proxy, firewall, and DNS configuration<ph name="END_LINK"></a><ex></a></ex></ph>
+ </message>
+ <message name="IDS_ERRORPAGES_SUGGESTION_CHECK_FIREWALL_ANTIVIRUS_SUMMARY" desc="The message displayed in a list of suggestions following a network error suggesting the user should try checking their firewall and anti-virus configuration. The suggestions list is prefixed with 'Try:'.">
+ <ph name="BEGIN_LINK"><a href="#buttons" onclick="toggleHelpBox()"></ph>Checking firewall and antivirus configurations<ph name="END_LINK"></a><ex></a></ex></ph>
+ </message>
+ <message name="IDS_ERRORPAGES_SUGGESTION_CHECK_PROXY_FIREWALL_SUMMARY" desc="The message displayed in a list of suggestions following a network error suggesting the user should try checking their proxy and firewall configuration. The suggestions list is prefixed with 'Try:'.">
+ <ph name="BEGIN_LINK"><a href="#buttons" onclick="toggleHelpBox()"></ph>Checking the proxy and the firewall<ph name="END_LINK"></a><ex></a></ex></ph>
+ </message>
+ <message name="IDS_ERRORPAGES_SUGGESTION_CHECK_PROXY_ADDRESS_SUMMARY" desc="The message displayed in a list of suggestions following a network error suggesting to check the proxy address. The suggestions list is prefixed with 'Try:'.">
+ <ph name="BEGIN_LINK"><a href="#buttons" onclick="toggleHelpBox()"></ph>Checking the proxy address<ph name="END_LINK"></a><ex></a></ex></ph>
+ </message>
+ </if>
<message name="IDS_ERRORPAGES_SUGGESTION_CONTACT_ADMIN_SUMMARY" desc="The message displayed in a list of suggestions following a network error suggesting to the user to contact his system administrator. The suggestions list is prefixed with 'Try:'.">
Contacting the system admin
</message>