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 CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ | 5 #ifndef CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ |
6 #define CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ | 6 #define CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // Returns true on success or false on failure. | 95 // Returns true on success or false on failure. |
96 bool SetCertTrust(const net::X509Certificate* cert, | 96 bool SetCertTrust(const net::X509Certificate* cert, |
97 net::CertType type, | 97 net::CertType type, |
98 net::NSSCertDatabase::TrustBits trust_bits); | 98 net::NSSCertDatabase::TrustBits trust_bits); |
99 | 99 |
100 // Delete the cert. Returns true on success. |cert| is still valid when this | 100 // Delete the cert. Returns true on success. |cert| is still valid when this |
101 // function returns. | 101 // function returns. |
102 bool Delete(net::X509Certificate* cert); | 102 bool Delete(net::X509Certificate* cert); |
103 | 103 |
104 // IsHardwareBacked returns true if |cert| is hardware backed. | 104 // IsHardwareBacked returns true if |cert| is hardware backed. |
105 // This function is only implemented for Chrome OS and always returns false | |
106 // for other platforms. | |
107 bool IsHardwareBacked(const net::X509Certificate* cert) const; | 105 bool IsHardwareBacked(const net::X509Certificate* cert) const; |
108 | 106 |
109 private: | 107 private: |
110 // Callback used by Refresh() for when the cert slots have been unlocked. | 108 // Callback used by Refresh() for when the cert slots have been unlocked. |
111 // This method does the actual refreshing. | 109 // This method does the actual refreshing. |
112 void RefreshSlotsUnlocked(); | 110 void RefreshSlotsUnlocked(); |
113 | 111 |
114 net::NSSCertDatabase* cert_db_; | 112 net::NSSCertDatabase* cert_db_; |
115 net::CertificateList cert_list_; | 113 net::CertificateList cert_list_; |
116 | 114 |
117 // The observer to notify when certificate list is refreshed. | 115 // The observer to notify when certificate list is refreshed. |
118 Observer* observer_; | 116 Observer* observer_; |
119 | 117 |
120 DISALLOW_COPY_AND_ASSIGN(CertificateManagerModel); | 118 DISALLOW_COPY_AND_ASSIGN(CertificateManagerModel); |
121 }; | 119 }; |
122 | 120 |
123 #endif // CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ | 121 #endif // CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ |
OLD | NEW |