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

Side by Side Diff: components/error_page/renderer/net_error_helper_core.cc

Issue 2425663002: Add an error page for resources blocked via XSS Auditor. (Closed)
Patch Set: frameNavigation test. Created 4 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/net_error_helper_core.h" 5 #include "components/error_page/renderer/net_error_helper_core.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 // For now, net::ERR_UNKNOWN_URL_SCHEME is only being displayed on 490 // For now, net::ERR_UNKNOWN_URL_SCHEME is only being displayed on
491 // Chrome for Android. 491 // Chrome for Android.
492 info.error.reason != net::ERR_UNKNOWN_URL_SCHEME && 492 info.error.reason != net::ERR_UNKNOWN_URL_SCHEME &&
493 // Do not trigger if the server rejects a client certificate. 493 // Do not trigger if the server rejects a client certificate.
494 // https://crbug.com/431387 494 // https://crbug.com/431387
495 !net::IsClientCertificateError(info.error.reason) && 495 !net::IsClientCertificateError(info.error.reason) &&
496 // Some servers reject client certificates with a generic 496 // Some servers reject client certificates with a generic
497 // handshake_failure alert. 497 // handshake_failure alert.
498 // https://crbug.com/431387 498 // https://crbug.com/431387
499 info.error.reason != net::ERR_SSL_PROTOCOL_ERROR && 499 info.error.reason != net::ERR_SSL_PROTOCOL_ERROR &&
500 // Do not trigger for XSS Auditor violations
501 info.error.reason != net::ERR_BLOCKED_BY_AUDITOR &&
500 !info.was_failed_post && 502 !info.was_failed_post &&
501 // Don't auto-reload non-http/https schemas. 503 // Don't auto-reload non-http/https schemas.
502 // https://crbug.com/471713 504 // https://crbug.com/471713
503 url.SchemeIsHTTPOrHTTPS(); 505 url.SchemeIsHTTPOrHTTPS();
504 } 506 }
505 507
506 NetErrorHelperCore::NetErrorHelperCore(Delegate* delegate, 508 NetErrorHelperCore::NetErrorHelperCore(Delegate* delegate,
507 bool auto_reload_enabled, 509 bool auto_reload_enabled,
508 bool auto_reload_visible_only, 510 bool auto_reload_visible_only,
509 bool is_visible) 511 bool is_visible)
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 1065
1064 bool NetErrorHelperCore::HasOfflinePages() const { 1066 bool NetErrorHelperCore::HasOfflinePages() const {
1065 #if defined(OS_ANDROID) 1067 #if defined(OS_ANDROID)
1066 return has_offline_pages_; 1068 return has_offline_pages_;
1067 #else 1069 #else
1068 return false; 1070 return false;
1069 #endif // defined(OS_ANDROID) 1071 #endif // defined(OS_ANDROID)
1070 } 1072 }
1071 1073
1072 } // namespace error_page 1074 } // namespace error_page
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698