Chromium Code Reviews| Index: chrome/common/localized_error.cc |
| diff --git a/chrome/common/localized_error.cc b/chrome/common/localized_error.cc |
| index 250b18509df0ca5e2ec763aa6b21f8f048a23fb8..7c519356a977d97d84a4313ecf45ab6f1f888f68 100644 |
| --- a/chrome/common/localized_error.cc |
| +++ b/chrome/common/localized_error.cc |
| @@ -6,10 +6,10 @@ |
| #include "base/i18n/rtl.h" |
| #include "base/logging.h" |
| -#include "base/string16.h" |
| #include "base/string_number_conversions.h" |
| #include "base/utf_string_conversions.h" |
| #include "base/values.h" |
| +#include "chrome/common/extensions/extension.h" |
| #include "chrome/common/extensions/extension_constants.h" |
| #include "chrome/common/extensions/extension_icon_set.h" |
| #include "chrome/common/extensions/extension_set.h" |
| @@ -26,8 +26,6 @@ |
| #include "base/win/windows_version.h" |
| #endif |
| -using WebKit::WebURLError; |
|
jochen (gone - plz use gerrit)
2013/01/14 13:45:37
please leave this in.
Joao da Silva
2013/01/14 13:49:45
Done. This was removed because the 2 out of 3 uses
|
| - |
| namespace { |
| static const char kRedirectLoopLearnMoreUrl[] = |
| @@ -271,6 +269,13 @@ const LocalizedErrorMap net_error_options[] = { |
| IDS_ERRORPAGES_DETAILS_BLOCKED, |
| SUGGEST_DISABLE_EXTENSION, |
| }, |
| + {net::ERR_NETWORK_CHANGED, |
| + IDS_ERRORPAGES_TITLE_LOAD_FAILED, |
| + IDS_ERRORPAGES_HEADING_NETWORK_ACCESS_DENIED, |
| + IDS_ERRORPAGES_SUMMARY_NETWORK_CHANGED, |
| + IDS_ERRORPAGES_DETAILS_NETWORK_CHANGED, |
| + SUGGEST_RELOAD | SUGGEST_CHECK_CONNECTION, |
| + }, |
| }; |
| const LocalizedErrorMap http_error_options[] = { |
| @@ -381,8 +386,8 @@ string16 GetErrorDetailsString(const std::string& error_domain, |
| } |
| const LocalizedErrorMap* FindErrorMapInArray(const LocalizedErrorMap* maps, |
| - size_t num_maps, |
| - int error_code) { |
| + size_t num_maps, |
| + int error_code) { |
| for (size_t i = 0; i < num_maps; ++i) { |
| if (maps[i].error_code == error_code) |
| return &maps[i]; |
| @@ -431,6 +436,7 @@ DictionaryValue* GetStandardMenuItemsText() { |
| const char LocalizedError::kHttpErrorDomain[] = "http"; |
| +// static |
| void LocalizedError::GetStrings(const WebKit::WebURLError& error, |
| DictionaryValue* error_strings, |
| const std::string& locale) { |
| @@ -656,6 +662,7 @@ void LocalizedError::GetStrings(const WebKit::WebURLError& error, |
| } |
| } |
| +// static |
| string16 LocalizedError::GetErrorDetails(const WebKit::WebURLError& error) { |
| const LocalizedErrorMap* error_map = |
| LookupErrorMap(error.domain.utf8(), error.reason); |
| @@ -665,11 +672,13 @@ string16 LocalizedError::GetErrorDetails(const WebKit::WebURLError& error) { |
| return l10n_util::GetStringUTF16(IDS_ERRORPAGES_DETAILS_UNKNOWN); |
| } |
| +// static |
| bool LocalizedError::HasStrings(const std::string& error_domain, |
| int error_code) { |
| return LookupErrorMap(error_domain, error_code) != NULL; |
| } |
| +// static |
| void LocalizedError::GetFormRepostStrings(const GURL& display_url, |
| DictionaryValue* error_strings) { |
| bool rtl = LocaleIsRTL(); |
| @@ -690,8 +699,9 @@ void LocalizedError::GetFormRepostStrings(const GURL& display_url, |
| error_strings->Set("summary", summary); |
| } |
| +// static |
| void LocalizedError::GetAppErrorStrings( |
| - const WebURLError& error, |
| + const WebKit::WebURLError& error, |
| const GURL& display_url, |
| const extensions::Extension* app, |
| DictionaryValue* error_strings) { |