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

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

Issue 2917133002: Perform redirect checks before OnReceivedRedirect in //net. (Closed)
Patch Set: nasko comments Created 3 years, 6 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 <utility> 9 #include <utility>
10 10
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 IDS_ERRORPAGES_SUMMARY_CONNECTION_CLOSED, 229 IDS_ERRORPAGES_SUMMARY_CONNECTION_CLOSED,
230 SUGGEST_NONE, 230 SUGGEST_NONE,
231 SHOW_BUTTON_RELOAD, 231 SHOW_BUTTON_RELOAD,
232 }, 232 },
233 {net::ERR_INCOMPLETE_CHUNKED_ENCODING, 233 {net::ERR_INCOMPLETE_CHUNKED_ENCODING,
234 IDS_ERRORPAGES_HEADING_PAGE_NOT_WORKING, 234 IDS_ERRORPAGES_HEADING_PAGE_NOT_WORKING,
235 IDS_ERRORPAGES_SUMMARY_CONNECTION_CLOSED, 235 IDS_ERRORPAGES_SUMMARY_CONNECTION_CLOSED,
236 SUGGEST_NONE, 236 SUGGEST_NONE,
237 SHOW_BUTTON_RELOAD, 237 SHOW_BUTTON_RELOAD,
238 }, 238 },
239 {net::ERR_INVALID_REDIRECT,
240 IDS_ERRORPAGES_HEADING_PAGE_NOT_WORKING,
241 IDS_ERRORPAGES_SUMMARY_INVALID_RESPONSE,
242 SUGGEST_NONE,
243 SHOW_BUTTON_RELOAD,
244 },
239 {net::ERR_SSL_PROTOCOL_ERROR, 245 {net::ERR_SSL_PROTOCOL_ERROR,
240 IDS_ERRORPAGES_HEADING_INSECURE_CONNECTION, 246 IDS_ERRORPAGES_HEADING_INSECURE_CONNECTION,
241 IDS_ERRORPAGES_SUMMARY_INVALID_RESPONSE, 247 IDS_ERRORPAGES_SUMMARY_INVALID_RESPONSE,
242 SUGGEST_DIAGNOSE_TOOL, 248 SUGGEST_DIAGNOSE_TOOL,
243 SHOW_BUTTON_RELOAD, 249 SHOW_BUTTON_RELOAD,
244 }, 250 },
245 {net::ERR_BAD_SSL_CLIENT_AUTH_CERT, 251 {net::ERR_BAD_SSL_CLIENT_AUTH_CERT,
246 IDS_ERRORPAGES_HEADING_INSECURE_CONNECTION, 252 IDS_ERRORPAGES_HEADING_INSECURE_CONNECTION,
247 IDS_ERRORPAGES_SUMMARY_BAD_SSL_CLIENT_AUTH_CERT, 253 IDS_ERRORPAGES_SUMMARY_BAD_SSL_CLIENT_AUTH_CERT,
248 SUGGEST_CONTACT_ADMINISTRATOR, 254 SUGGEST_CONTACT_ADMINISTRATOR,
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 1085
1080 bool LocalizedError::HasStrings(const std::string& error_domain, 1086 bool LocalizedError::HasStrings(const std::string& error_domain,
1081 int error_code) { 1087 int error_code) {
1082 // Whether or not the there are strings for an error does not depend on 1088 // Whether or not the there are strings for an error does not depend on
1083 // whether or not the page was be generated by a POST, so just claim it was 1089 // whether or not the page was be generated by a POST, so just claim it was
1084 // not. 1090 // not.
1085 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != nullptr; 1091 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != nullptr;
1086 } 1092 }
1087 1093
1088 } // namespace error_page 1094 } // namespace error_page
OLDNEW
« no previous file with comments | « chrome/browser/net/errorpage_browsertest.cc ('k') | content/browser/browser_side_navigation_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698