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 #ifndef NET_BASE_TEST_ROOT_CERTS_H_ | 5 #ifndef NET_BASE_TEST_ROOT_CERTS_H_ |
6 #define NET_BASE_TEST_ROOT_CERTS_H_ | 6 #define NET_BASE_TEST_ROOT_CERTS_H_ |
7 | 7 |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
84 // It is necessary to maintain a cache of the original certificate trust | 84 // It is necessary to maintain a cache of the original certificate trust |
85 // settings, in order to restore them when Clear() is called. | 85 // settings, in order to restore them when Clear() is called. |
86 class TrustEntry; | 86 class TrustEntry; |
87 std::list<TrustEntry*> trust_cache_; | 87 std::list<TrustEntry*> trust_cache_; |
88 #elif defined(OS_WIN) | 88 #elif defined(OS_WIN) |
89 HCERTSTORE temporary_roots_; | 89 HCERTSTORE temporary_roots_; |
90 #elif defined(OS_MACOSX) | 90 #elif defined(OS_MACOSX) |
91 base::mac::ScopedCFTypeRef<CFMutableArrayRef> temporary_roots_; | 91 base::mac::ScopedCFTypeRef<CFMutableArrayRef> temporary_roots_; |
92 #endif | 92 #endif |
93 | 93 |
94 #if defined(OS_WIN) || defined(USE_OPENSSL) | 94 #if defined(OS_WIN) || defined(USE_OPENSSL) || defined(OS_ANDROID) |
Ryan Sleevi
2012/12/07 03:25:26
Isn't this redundant here - USE_OPENSSL is always
ppi
2012/12/11 04:24:21
David already pointed this out earlier (so that's
Ryan Sleevi
2012/12/11 17:40:10
Whenever such a comment is coupled with "more code
ppi
2012/12/11 19:12:50
Removed the condition in patch set 11.
| |
95 // True if there are no temporarily trusted root certificates. | 95 // True if there are no temporarily trusted root certificates. |
96 bool empty_; | 96 bool empty_; |
97 #endif | 97 #endif |
98 | 98 |
99 DISALLOW_COPY_AND_ASSIGN(TestRootCerts); | 99 DISALLOW_COPY_AND_ASSIGN(TestRootCerts); |
100 }; | 100 }; |
101 | 101 |
102 // Scoped helper for unittests to handle safely managing trusted roots. | 102 // Scoped helper for unittests to handle safely managing trusted roots. |
103 class NET_EXPORT_PRIVATE ScopedTestRoot { | 103 class NET_EXPORT_PRIVATE ScopedTestRoot { |
104 public: | 104 public: |
(...skipping 11 matching lines...) Expand all Loading... | |
116 | 116 |
117 private: | 117 private: |
118 scoped_refptr<X509Certificate> cert_; | 118 scoped_refptr<X509Certificate> cert_; |
119 | 119 |
120 DISALLOW_COPY_AND_ASSIGN(ScopedTestRoot); | 120 DISALLOW_COPY_AND_ASSIGN(ScopedTestRoot); |
121 }; | 121 }; |
122 | 122 |
123 } // namespace net | 123 } // namespace net |
124 | 124 |
125 #endif // NET_BASE_TEST_ROOT_CERTS_H_ | 125 #endif // NET_BASE_TEST_ROOT_CERTS_H_ |
OLD | NEW |