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

Unified Diff: chrome/renderer/localized_error.cc

Issue 4813001: Error text for "ERR_ADDRESS_UNREACHABLE". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | « chrome/app/generated_resources.grd ('k') | chrome/renderer/resources/error_no_details.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/localized_error.cc
===================================================================
--- chrome/renderer/localized_error.cc (revision 65404)
+++ chrome/renderer/localized_error.cc (working copy)
@@ -36,7 +36,9 @@
SUGGEST_NONE = 0,
SUGGEST_RELOAD = 1 << 0,
SUGGEST_HOSTNAME = 1 << 1,
- SUGGEST_LEARNMORE = 1 << 2,
+ SUGGEST_FIREWALL_CONFIG = 1 << 2,
+ SUGGEST_PROXY_CONFIG = 1 << 3,
+ SUGGEST_LEARNMORE = 1 << 4,
};
struct LocalizedErrorMap {
@@ -77,19 +79,26 @@
IDS_ERRORPAGES_DETAILS_NAME_NOT_RESOLVED,
SUGGEST_RELOAD,
},
+ {net::ERR_ADDRESS_UNREACHABLE,
+ IDS_ERRORPAGES_TITLE_NOT_AVAILABLE,
+ IDS_ERRORPAGES_HEADING_NOT_AVAILABLE,
+ IDS_ERRORPAGES_SUMMARY_ADDRESS_UNREACHABLE,
+ IDS_ERRORPAGES_DETAILS_ADDRESS_UNREACHABLE,
+ SUGGEST_RELOAD | SUGGEST_FIREWALL_CONFIG | SUGGEST_PROXY_CONFIG,
+ },
{net::ERR_NETWORK_ACCESS_DENIED,
IDS_ERRORPAGES_TITLE_NOT_AVAILABLE,
IDS_ERRORPAGES_HEADING_NETWORK_ACCESS_DENIED,
IDS_ERRORPAGES_SUMMARY_NETWORK_ACCESS_DENIED,
IDS_ERRORPAGES_DETAILS_NETWORK_ACCESS_DENIED,
- SUGGEST_NONE,
+ SUGGEST_FIREWALL_CONFIG,
},
{net::ERR_PROXY_CONNECTION_FAILED,
IDS_ERRORPAGES_TITLE_NOT_AVAILABLE,
IDS_ERRORPAGES_HEADING_PROXY_CONNECTION_FAILED,
IDS_ERRORPAGES_SUMMARY_PROXY_CONNECTION_FAILED,
IDS_ERRORPAGES_DETAILS_PROXY_CONNECTION_FAILED,
- SUGGEST_NONE,
+ SUGGEST_PROXY_CONFIG,
},
{net::ERR_INTERNET_DISCONNECTED,
IDS_ERRORPAGES_TITLE_NOT_AVAILABLE,
@@ -348,17 +357,6 @@
error_strings->SetString("details",
GetErrorDetailsString(error_domain, error_code, details));
- // Any special case processing that needs to happen for particular
- // errors (hack).
- if (error_domain == net::kErrorDomain &&
- error_code == net::ERR_PROXY_CONNECTION_FAILED) {
- // Suffix the platform dependent portion of the summary section.
- summary->SetString("msg",
- l10n_util::GetStringFUTF16(options.summary_resource_id,
- l10n_util::GetStringUTF16(
- IDS_ERRORPAGES_SUMMARY_PROXY_CONNECTION_FAILED_PLATFORM)));
- }
-
// Platform specific instructions for diagnosing network issues on OSX and
// Windows.
#if defined(OS_MACOSX) || defined(OS_WIN)
@@ -417,6 +415,29 @@
}
}
+ if (options.suggestions & SUGGEST_FIREWALL_CONFIG) {
+ DictionaryValue* suggest_firewall_config = new DictionaryValue;
+ suggest_firewall_config->SetString("msg",
+ l10n_util::GetStringUTF16(IDS_ERRORPAGES_SUGGESTION_FIREWALL_CONFIG));
+ suggest_firewall_config->SetString("productName",
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
+ error_strings->Set("suggestionsFirewallConfig", suggest_firewall_config);
+ }
+
+ if (options.suggestions & SUGGEST_PROXY_CONFIG) {
+ DictionaryValue* suggest_proxy_config = new DictionaryValue;
+ suggest_proxy_config->SetString("msg",
+ l10n_util::GetStringUTF16(IDS_ERRORPAGES_SUGGESTION_PROXY_CONFIG));
+ error_strings->Set("suggestionsProxyConfig", suggest_proxy_config);
+
+ DictionaryValue* suggest_proxy_disable = new DictionaryValue;
+ suggest_proxy_disable->SetString("msg",
+ l10n_util::GetStringFUTF16(IDS_ERRORPAGES_SUGGESTION_PROXY_DISABLE,
+ l10n_util::GetStringUTF16(
+ IDS_ERRORPAGES_SUGGESTION_PROXY_DISABLE_PLATFORM)));
+ error_strings->Set("suggestionsProxyDisable", suggest_proxy_disable);
+ }
+
if (options.suggestions & SUGGEST_LEARNMORE) {
GURL learn_more_url;
switch (options.error_code) {
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/renderer/resources/error_no_details.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698