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

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

Issue 1341923002: Create a component for SSL error handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update iOS grit whitelist Created 5 years, 3 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 | « chrome/chrome_browser.gypi ('k') | components/BUILD.gn » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/common/localized_error.h" 5 #include "chrome/common/localized_error.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/common/chrome_switches.h" 16 #include "chrome/common/chrome_switches.h"
17 #include "chrome/grit/chromium_strings.h" 17 #include "chrome/grit/chromium_strings.h"
18 #include "chrome/grit/generated_resources.h" 18 #include "chrome/grit/generated_resources.h"
19 #include "components/error_page/common/error_page_params.h" 19 #include "components/error_page/common/error_page_params.h"
20 #include "components/error_page/common/net_error_info.h" 20 #include "components/error_page/common/net_error_info.h"
21 #include "components/url_formatter/url_formatter.h" 21 #include "components/url_formatter/url_formatter.h"
22 #include "grit/components_chromium_strings.h" 22 #include "grit/components_chromium_strings.h"
23 #include "grit/components_google_chrome_strings.h" 23 #include "grit/components_google_chrome_strings.h"
24 #include "grit/components_strings.h"
24 #include "net/base/escape.h" 25 #include "net/base/escape.h"
25 #include "net/base/net_errors.h" 26 #include "net/base/net_errors.h"
26 #include "third_party/WebKit/public/platform/WebURLError.h" 27 #include "third_party/WebKit/public/platform/WebURLError.h"
27 #include "ui/base/l10n/l10n_util.h" 28 #include "ui/base/l10n/l10n_util.h"
28 #include "ui/base/webui/web_ui_util.h" 29 #include "ui/base/webui/web_ui_util.h"
29 30
30 #if defined(OS_WIN) 31 #if defined(OS_WIN)
31 #include "base/win/windows_version.h" 32 #include "base/win/windows_version.h"
32 #endif 33 #endif
33 34
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 {net::ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY, 262 {net::ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY,
262 IDS_ERRORPAGES_TITLE_LOAD_FAILED, 263 IDS_ERRORPAGES_TITLE_LOAD_FAILED,
263 IDS_ERRORPAGES_HEADING_WEAK_SERVER_EPHEMERAL_DH_KEY, 264 IDS_ERRORPAGES_HEADING_WEAK_SERVER_EPHEMERAL_DH_KEY,
264 IDS_ERRORPAGES_SUMMARY_WEAK_SERVER_EPHEMERAL_DH_KEY, 265 IDS_ERRORPAGES_SUMMARY_WEAK_SERVER_EPHEMERAL_DH_KEY,
265 IDS_ERRORPAGES_DETAILS_SSL_PROTOCOL_ERROR, 266 IDS_ERRORPAGES_DETAILS_SSL_PROTOCOL_ERROR,
266 SUGGEST_LEARNMORE, 267 SUGGEST_LEARNMORE,
267 }, 268 },
268 {net::ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN, 269 {net::ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN,
269 IDS_ERRORPAGES_TITLE_LOAD_FAILED, 270 IDS_ERRORPAGES_TITLE_LOAD_FAILED,
270 IDS_ERRORPAGES_HEADING_PINNING_FAILURE, 271 IDS_ERRORPAGES_HEADING_PINNING_FAILURE,
271 IDS_ERRORPAGES_SUMMARY_PINNING_FAILURE, 272 IDS_CERT_ERROR_SUMMARY_PINNING_FAILURE_DETAILS,
272 IDS_ERRORPAGES_DETAILS_PINNING_FAILURE, 273 IDS_CERT_ERROR_SUMMARY_PINNING_FAILURE_DESCRIPTION,
273 SUGGEST_NONE, 274 SUGGEST_NONE,
274 }, 275 },
275 {net::ERR_TEMPORARILY_THROTTLED, 276 {net::ERR_TEMPORARILY_THROTTLED,
276 IDS_ERRORPAGES_TITLE_ACCESS_DENIED, 277 IDS_ERRORPAGES_TITLE_ACCESS_DENIED,
277 IDS_ERRORPAGES_HEADING_ACCESS_DENIED, 278 IDS_ERRORPAGES_HEADING_ACCESS_DENIED,
278 IDS_ERRORPAGES_SUMMARY_TEMPORARILY_THROTTLED, 279 IDS_ERRORPAGES_SUMMARY_TEMPORARILY_THROTTLED,
279 IDS_ERRORPAGES_DETAILS_TEMPORARILY_THROTTLED, 280 IDS_ERRORPAGES_DETAILS_TEMPORARILY_THROTTLED,
280 SUGGEST_NONE, 281 SUGGEST_NONE,
281 }, 282 },
282 {net::ERR_BLOCKED_BY_CLIENT, 283 {net::ERR_BLOCKED_BY_CLIENT,
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 cache_button->SetString("cacheUrl", cache_url); 924 cache_button->SetString("cacheUrl", cache_url);
924 cache_button->SetInteger("trackingId", cache_tracking_id); 925 cache_button->SetInteger("trackingId", cache_tracking_id);
925 error_strings->Set("cacheButton", cache_button.release()); 926 error_strings->Set("cacheButton", cache_button.release());
926 927
927 // Remove the item from suggestions dictionary so that it does not get 928 // Remove the item from suggestions dictionary so that it does not get
928 // displayed by the template in the details section. 929 // displayed by the template in the details section.
929 suggestions->Remove(0, nullptr); 930 suggestions->Remove(0, nullptr);
930 } 931 }
931 } 932 }
932 } 933 }
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | components/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698