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

Side by Side Diff: chrome/renderer/localized_error.cc

Issue 159904: Add a new net::Error value: ERR_CONNECTION_TIMED_OUT. (Closed)
Patch Set: Use MapConnectError() for asynchronous case too. Created 11 years, 4 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/renderer/render_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698