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

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: Rebase. 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
« no previous file with comments | « no previous file | content/browser/frame_host/ancestor_throttle.h » ('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 "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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 unsigned int title_resource_id; 83 unsigned int title_resource_id;
84 unsigned int heading_resource_id; 84 unsigned int heading_resource_id;
85 // Detailed summary used when the error is in the main frame. 85 // Detailed summary used when the error is in the main frame.
86 unsigned int summary_resource_id; 86 unsigned int summary_resource_id;
87 // Short one sentence description shown on mouse over when the error is in 87 // Short one sentence description shown on mouse over when the error is in
88 // a frame. 88 // a frame.
89 unsigned int details_resource_id; 89 unsigned int details_resource_id;
90 int suggestions; // Bitmap of SUGGEST_* values. 90 int suggestions; // Bitmap of SUGGEST_* values.
91 }; 91 };
92 92
93 // clang-format off
94 const LocalizedErrorMap net_error_options[] = { 93 const LocalizedErrorMap net_error_options[] = {
95 {net::ERR_TIMED_OUT, 94 {net::ERR_TIMED_OUT,
96 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, 95 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE,
97 IDS_ERRORPAGES_HEADING_NOT_AVAILABLE, 96 IDS_ERRORPAGES_HEADING_NOT_AVAILABLE,
98 IDS_ERRORPAGES_SUMMARY_TIMED_OUT, 97 IDS_ERRORPAGES_SUMMARY_TIMED_OUT,
99 IDS_ERRORPAGES_DETAILS_TIMED_OUT, 98 IDS_ERRORPAGES_DETAILS_TIMED_OUT,
100 SUGGEST_RELOAD | SUGGEST_CHECK_CONNECTION | SUGGEST_FIREWALL_CONFIG | 99 SUGGEST_RELOAD | SUGGEST_CHECK_CONNECTION | SUGGEST_FIREWALL_CONFIG |
101 SUGGEST_PROXY_CONFIG, 100 SUGGEST_PROXY_CONFIG,
102 }, 101 },
103 {net::ERR_CONNECTION_TIMED_OUT, 102 {net::ERR_CONNECTION_TIMED_OUT,
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 IDS_ERRORPAGES_DETAILS_TEMPORARY_BACKOFF, 343 IDS_ERRORPAGES_DETAILS_TEMPORARY_BACKOFF,
345 SUGGEST_NONE, 344 SUGGEST_NONE,
346 }, 345 },
347 {net::ERR_SSL_SERVER_CERT_BAD_FORMAT, 346 {net::ERR_SSL_SERVER_CERT_BAD_FORMAT,
348 IDS_ERRORPAGES_TITLE_LOAD_FAILED, 347 IDS_ERRORPAGES_TITLE_LOAD_FAILED,
349 IDS_ERRORPAGES_HEADING_INSECURE_CONNECTION, 348 IDS_ERRORPAGES_HEADING_INSECURE_CONNECTION,
350 IDS_ERRORPAGES_SUMMARY_SSL_SECURITY_ERROR, 349 IDS_ERRORPAGES_SUMMARY_SSL_SECURITY_ERROR,
351 IDS_ERRORPAGES_DETAILS_SSL_PROTOCOL_ERROR, 350 IDS_ERRORPAGES_DETAILS_SSL_PROTOCOL_ERROR,
352 SUGGEST_NONE, 351 SUGGEST_NONE,
353 }, 352 },
354 {net::ERR_BLOCKED_BY_RESPONSE,
355 IDS_ERRORPAGES_TITLE_BLOCKED,
356 IDS_ERRORPAGES_HEADING_BLOCKED,
357 IDS_ERRORPAGES_SUMMARY_CONNECTION_REFUSED,
358 IDS_ERRORPAGES_DETAILS_CONNECTION_REFUSED,
359 SUGGEST_NONE,
360 },
361 }; 353 };
362 // clang-format on
363 354
364 // Special error page to be used in the case of navigating back to a page 355 // Special error page to be used in the case of navigating back to a page
365 // generated by a POST. LocalizedError::HasStrings expects this net error code 356 // generated by a POST. LocalizedError::HasStrings expects this net error code
366 // to also appear in the array above. 357 // to also appear in the array above.
367 const LocalizedErrorMap repost_error = { 358 const LocalizedErrorMap repost_error = {
368 net::ERR_CACHE_MISS, 359 net::ERR_CACHE_MISS,
369 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, 360 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE,
370 IDS_HTTP_POST_WARNING_TITLE, 361 IDS_HTTP_POST_WARNING_TITLE,
371 IDS_ERRORPAGES_HTTP_POST_WARNING, 362 IDS_ERRORPAGES_HTTP_POST_WARNING,
372 IDS_ERRORPAGES_DETAILS_CACHE_READ_FAILURE, 363 IDS_ERRORPAGES_DETAILS_CACHE_READ_FAILURE,
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 1065
1075 bool LocalizedError::HasStrings(const std::string& error_domain, 1066 bool LocalizedError::HasStrings(const std::string& error_domain,
1076 int error_code) { 1067 int error_code) {
1077 // Whether or not the there are strings for an error does not depend on 1068 // Whether or not the there are strings for an error does not depend on
1078 // whether or not the page was be generated by a POST, so just claim it was 1069 // whether or not the page was be generated by a POST, so just claim it was
1079 // not. 1070 // not.
1080 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != nullptr; 1071 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != nullptr;
1081 } 1072 }
1082 1073
1083 } // namespace error_page 1074 } // namespace error_page
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/ancestor_throttle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698