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