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

Side by Side Diff: components/error_page/common/localized_error.cc

Issue 1988933003: Revert "Introduce AncestorThrottle, which will process 'X-Frame-Options' headers." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
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 "components/error_page/common/localized_error.h" 5 #include "components/error_page/common/localized_error.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 unsigned int title_resource_id; 85 unsigned int title_resource_id;
86 unsigned int heading_resource_id; 86 unsigned int heading_resource_id;
87 // Detailed summary used when the error is in the main frame. 87 // Detailed summary used when the error is in the main frame.
88 unsigned int summary_resource_id; 88 unsigned int summary_resource_id;
89 // Short one sentence description shown on mouse over when the error is in 89 // Short one sentence description shown on mouse over when the error is in
90 // a frame. 90 // a frame.
91 unsigned int details_resource_id; 91 unsigned int details_resource_id;
92 int suggestions; // Bitmap of SUGGEST_* values. 92 int suggestions; // Bitmap of SUGGEST_* values.
93 }; 93 };
94 94
95 // clang-format off
96 const LocalizedErrorMap net_error_options[] = { 95 const LocalizedErrorMap net_error_options[] = {
97 {net::ERR_TIMED_OUT, 96 {net::ERR_TIMED_OUT,
98 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, 97 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE,
99 IDS_ERRORPAGES_HEADING_NOT_AVAILABLE, 98 IDS_ERRORPAGES_HEADING_NOT_AVAILABLE,
100 IDS_ERRORPAGES_SUMMARY_TIMED_OUT, 99 IDS_ERRORPAGES_SUMMARY_TIMED_OUT,
101 IDS_ERRORPAGES_DETAILS_TIMED_OUT, 100 IDS_ERRORPAGES_DETAILS_TIMED_OUT,
102 SUGGEST_RELOAD | SUGGEST_CHECK_CONNECTION | SUGGEST_FIREWALL_CONFIG | 101 SUGGEST_RELOAD | SUGGEST_CHECK_CONNECTION | SUGGEST_FIREWALL_CONFIG |
103 SUGGEST_PROXY_CONFIG, 102 SUGGEST_PROXY_CONFIG,
104 }, 103 },
105 {net::ERR_CONNECTION_TIMED_OUT, 104 {net::ERR_CONNECTION_TIMED_OUT,
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 IDS_ERRORPAGES_DETAILS_TEMPORARY_BACKOFF, 345 IDS_ERRORPAGES_DETAILS_TEMPORARY_BACKOFF,
347 SUGGEST_NONE, 346 SUGGEST_NONE,
348 }, 347 },
349 {net::ERR_SSL_SERVER_CERT_BAD_FORMAT, 348 {net::ERR_SSL_SERVER_CERT_BAD_FORMAT,
350 IDS_ERRORPAGES_TITLE_LOAD_FAILED, 349 IDS_ERRORPAGES_TITLE_LOAD_FAILED,
351 IDS_ERRORPAGES_HEADING_INSECURE_CONNECTION, 350 IDS_ERRORPAGES_HEADING_INSECURE_CONNECTION,
352 IDS_ERRORPAGES_SUMMARY_SSL_SECURITY_ERROR, 351 IDS_ERRORPAGES_SUMMARY_SSL_SECURITY_ERROR,
353 IDS_ERRORPAGES_DETAILS_SSL_PROTOCOL_ERROR, 352 IDS_ERRORPAGES_DETAILS_SSL_PROTOCOL_ERROR,
354 SUGGEST_NONE, 353 SUGGEST_NONE,
355 }, 354 },
356 {net::ERR_BLOCKED_BY_RESPONSE,
357 IDS_ERRORPAGES_TITLE_BLOCKED,
358 IDS_ERRORPAGES_HEADING_BLOCKED,
359 IDS_ERRORPAGES_SUMMARY_CONNECTION_REFUSED,
360 IDS_ERRORPAGES_DETAILS_CONNECTION_REFUSED,
361 SUGGEST_NONE,
362 },
363 }; 355 };
364 // clang-format on
365 356
366 // Special error page to be used in the case of navigating back to a page 357 // Special error page to be used in the case of navigating back to a page
367 // generated by a POST. LocalizedError::HasStrings expects this net error code 358 // generated by a POST. LocalizedError::HasStrings expects this net error code
368 // to also appear in the array above. 359 // to also appear in the array above.
369 const LocalizedErrorMap repost_error = { 360 const LocalizedErrorMap repost_error = {
370 net::ERR_CACHE_MISS, 361 net::ERR_CACHE_MISS,
371 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, 362 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE,
372 IDS_HTTP_POST_WARNING_TITLE, 363 IDS_HTTP_POST_WARNING_TITLE,
373 IDS_ERRORPAGES_HTTP_POST_WARNING, 364 IDS_ERRORPAGES_HTTP_POST_WARNING,
374 IDS_ERRORPAGES_DETAILS_CACHE_READ_FAILURE, 365 IDS_ERRORPAGES_DETAILS_CACHE_READ_FAILURE,
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 1077
1087 bool LocalizedError::HasStrings(const std::string& error_domain, 1078 bool LocalizedError::HasStrings(const std::string& error_domain,
1088 int error_code) { 1079 int error_code) {
1089 // Whether or not the there are strings for an error does not depend on 1080 // Whether or not the there are strings for an error does not depend on
1090 // whether or not the page was be generated by a POST, so just claim it was 1081 // whether or not the page was be generated by a POST, so just claim it was
1091 // not. 1082 // not.
1092 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != nullptr; 1083 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != nullptr;
1093 } 1084 }
1094 1085
1095 } // namespace error_page 1086 } // namespace error_page
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/ancestor_throttle.h » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698