| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #import "ios/web/navigation/crw_session_certificate_policy_manager.h" | 5 #import "ios/web/navigation/crw_session_certificate_policy_manager.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/strings/sys_string_conversions.h" | 13 #include "base/strings/sys_string_conversions.h" |
| 14 #include "ios/web/public/certificate_policy_cache.h" | 14 #include "ios/web/public/certificate_policy_cache.h" |
| 15 #include "ios/web/public/web_thread.h" | 15 #include "ios/web/public/web_thread.h" |
| 16 #include "net/cert/x509_certificate.h" | 16 #include "net/cert/x509_certificate.h" |
| 17 | 17 |
| 18 // Break if we detect that CertStatus values changed, because we persist them on | 18 // Break if we detect that CertStatus values changed, because we persist them on |
| 19 // disk and thus require them to be consistent. | 19 // disk and thus require them to be consistent. |
| 20 static_assert(net::CERT_STATUS_ALL_ERRORS == 0xFFFF, | 20 static_assert(net::CERT_STATUS_ALL_ERRORS == 0xFF00FFFF, |
| 21 "The value of CERT_STATUS_ALL_ERRORS changed!"); | 21 "The value of CERT_STATUS_ALL_ERRORS changed!"); |
| 22 static_assert(net::CERT_STATUS_COMMON_NAME_INVALID == 1 << 0, | 22 static_assert(net::CERT_STATUS_COMMON_NAME_INVALID == 1 << 0, |
| 23 "The value of CERT_STATUS_COMMON_NAME_INVALID changed!"); | 23 "The value of CERT_STATUS_COMMON_NAME_INVALID changed!"); |
| 24 static_assert(net::CERT_STATUS_DATE_INVALID == 1 << 1, | 24 static_assert(net::CERT_STATUS_DATE_INVALID == 1 << 1, |
| 25 "The value of CERT_STATUS_DATE_INVALID changed!"); | 25 "The value of CERT_STATUS_DATE_INVALID changed!"); |
| 26 static_assert(net::CERT_STATUS_AUTHORITY_INVALID == 1 << 2, | 26 static_assert(net::CERT_STATUS_AUTHORITY_INVALID == 1 << 2, |
| 27 "The value of CERT_STATUS_AUTHORITY_INVALID changed!"); | 27 "The value of CERT_STATUS_AUTHORITY_INVALID changed!"); |
| 28 static_assert(net::CERT_STATUS_NO_REVOCATION_MECHANISM == 1 << 4, | 28 static_assert(net::CERT_STATUS_NO_REVOCATION_MECHANISM == 1 << 4, |
| 29 "The value of CERT_STATUS_NO_REVOCATION_MECHANISM changed!"); | 29 "The value of CERT_STATUS_NO_REVOCATION_MECHANISM changed!"); |
| 30 static_assert(net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION == 1 << 5, | 30 static_assert(net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION == 1 << 5, |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 } | 175 } |
| 176 | 176 |
| 177 - (id)copyWithZone:(NSZone*)zone { | 177 - (id)copyWithZone:(NSZone*)zone { |
| 178 DCHECK([NSThread isMainThread]); | 178 DCHECK([NSThread isMainThread]); |
| 179 CRWSessionCertificatePolicyManager* copy = [[[self class] alloc] init]; | 179 CRWSessionCertificatePolicyManager* copy = [[[self class] alloc] init]; |
| 180 copy->allowed_ = allowed_; | 180 copy->allowed_ = allowed_; |
| 181 return copy; | 181 return copy; |
| 182 } | 182 } |
| 183 | 183 |
| 184 @end | 184 @end |
| OLD | NEW |