| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/renderer/localized_error.h" | 5 #include "chrome/renderer/localized_error.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 WebErrorNetErrorMap net_error_options[] = { | 41 WebErrorNetErrorMap net_error_options[] = { |
| 42 {net::ERR_TIMED_OUT, | 42 {net::ERR_TIMED_OUT, |
| 43 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, | 43 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, |
| 44 IDS_ERRORPAGES_HEADING_NOT_AVAILABLE, | 44 IDS_ERRORPAGES_HEADING_NOT_AVAILABLE, |
| 45 IDS_ERRORPAGES_SUMMARY_NOT_AVAILABLE, | 45 IDS_ERRORPAGES_SUMMARY_NOT_AVAILABLE, |
| 46 IDS_ERRORPAGES_DETAILS_TIMED_OUT, | 46 IDS_ERRORPAGES_DETAILS_TIMED_OUT, |
| 47 SUGGEST_RELOAD, | 47 SUGGEST_RELOAD, |
| 48 }, | 48 }, |
| 49 {net::ERR_CONNECTION_TIMED_OUT, |
| 50 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, |
| 51 IDS_ERRORPAGES_HEADING_NOT_AVAILABLE, |
| 52 IDS_ERRORPAGES_SUMMARY_NOT_AVAILABLE, |
| 53 IDS_ERRORPAGES_DETAILS_TIMED_OUT, |
| 54 SUGGEST_RELOAD, |
| 55 }, |
| 49 {net::ERR_CONNECTION_FAILED, | 56 {net::ERR_CONNECTION_FAILED, |
| 50 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, | 57 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, |
| 51 IDS_ERRORPAGES_HEADING_NOT_AVAILABLE, | 58 IDS_ERRORPAGES_HEADING_NOT_AVAILABLE, |
| 52 IDS_ERRORPAGES_SUMMARY_NOT_AVAILABLE, | 59 IDS_ERRORPAGES_SUMMARY_NOT_AVAILABLE, |
| 53 IDS_ERRORPAGES_DETAILS_CONNECT_FAILED, | 60 IDS_ERRORPAGES_DETAILS_CONNECT_FAILED, |
| 54 SUGGEST_RELOAD, | 61 SUGGEST_RELOAD, |
| 55 }, | 62 }, |
| 56 {net::ERR_NAME_NOT_RESOLVED, | 63 {net::ERR_NAME_NOT_RESOLVED, |
| 57 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, | 64 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, |
| 58 IDS_ERRORPAGES_HEADING_NOT_AVAILABLE, | 65 IDS_ERRORPAGES_HEADING_NOT_AVAILABLE, |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 L"title", l10n_util::GetStringF(IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, | 217 L"title", l10n_util::GetStringF(IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, |
| 211 failed_url.c_str())); | 218 failed_url.c_str())); |
| 212 error_strings->SetString(L"heading", | 219 error_strings->SetString(L"heading", |
| 213 l10n_util::GetString(IDS_HTTP_POST_WARNING_TITLE)); | 220 l10n_util::GetString(IDS_HTTP_POST_WARNING_TITLE)); |
| 214 error_strings->SetString(L"suggestionsHeading", L""); | 221 error_strings->SetString(L"suggestionsHeading", L""); |
| 215 DictionaryValue* summary = new DictionaryValue; | 222 DictionaryValue* summary = new DictionaryValue; |
| 216 summary->SetString(L"msg", | 223 summary->SetString(L"msg", |
| 217 l10n_util::GetString(IDS_ERRORPAGES_HTTP_POST_WARNING)); | 224 l10n_util::GetString(IDS_ERRORPAGES_HTTP_POST_WARNING)); |
| 218 error_strings->Set(L"summary", summary); | 225 error_strings->Set(L"summary", summary); |
| 219 } | 226 } |
| OLD | NEW |