OLD | NEW |
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 "content/browser/ssl/ssl_policy.h" | 5 #include "content/browser/ssl/ssl_policy.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 handler->ContinueRequest(); | 71 handler->ContinueRequest(); |
72 break; | 72 break; |
73 case net::ERR_CERT_UNABLE_TO_CHECK_REVOCATION: | 73 case net::ERR_CERT_UNABLE_TO_CHECK_REVOCATION: |
74 // We ignore this error but will show a warning status in the location | 74 // We ignore this error but will show a warning status in the location |
75 // bar. | 75 // bar. |
76 handler->ContinueRequest(); | 76 handler->ContinueRequest(); |
77 break; | 77 break; |
78 case net::ERR_CERT_CONTAINS_ERRORS: | 78 case net::ERR_CERT_CONTAINS_ERRORS: |
79 case net::ERR_CERT_REVOKED: | 79 case net::ERR_CERT_REVOKED: |
80 case net::ERR_CERT_INVALID: | 80 case net::ERR_CERT_INVALID: |
81 case net::ERR_CERT_NOT_IN_DNS: | |
82 OnCertErrorInternal(handler, false, handler->fatal()); | 81 OnCertErrorInternal(handler, false, handler->fatal()); |
83 break; | 82 break; |
84 default: | 83 default: |
85 NOTREACHED(); | 84 NOTREACHED(); |
86 handler->CancelRequest(); | 85 handler->CancelRequest(); |
87 break; | 86 break; |
88 } | 87 } |
89 } | 88 } |
90 | 89 |
91 void SSLPolicy::DidRunInsecureContent(NavigationEntryImpl* entry, | 90 void SSLPolicy::DidRunInsecureContent(NavigationEntryImpl* entry, |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 entry->GetSSL().security_style = entry->GetURL().SchemeIsSecure() ? | 227 entry->GetSSL().security_style = entry->GetURL().SchemeIsSecure() ? |
229 content::SECURITY_STYLE_AUTHENTICATED : | 228 content::SECURITY_STYLE_AUTHENTICATED : |
230 content::SECURITY_STYLE_UNAUTHENTICATED; | 229 content::SECURITY_STYLE_UNAUTHENTICATED; |
231 } | 230 } |
232 | 231 |
233 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { | 232 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { |
234 GURL parsed_origin(origin); | 233 GURL parsed_origin(origin); |
235 if (parsed_origin.SchemeIsSecure()) | 234 if (parsed_origin.SchemeIsSecure()) |
236 backend_->HostRanInsecureContent(parsed_origin.host(), pid); | 235 backend_->HostRanInsecureContent(parsed_origin.host(), pid); |
237 } | 236 } |
OLD | NEW |