| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 // Fill |map| with the certificates matching |filter_type|. | 51 // Fill |map| with the certificates matching |filter_type|. |
| 52 void FilterAndBuildOrgGroupingMap(net::CertType filter_type, | 52 void FilterAndBuildOrgGroupingMap(net::CertType filter_type, |
| 53 OrgGroupingMap* map) const; | 53 OrgGroupingMap* map) const; |
| 54 | 54 |
| 55 // Get the data to be displayed in |column| for the given |cert|. | 55 // Get the data to be displayed in |column| for the given |cert|. |
| 56 string16 GetColumnText(const net::X509Certificate& cert, Column column) const; | 56 string16 GetColumnText(const net::X509Certificate& cert, Column column) const; |
| 57 | 57 |
| 58 // Import certificates from PKCS #12 encoded |data|, using the given | 58 // Import certificates from PKCS #12 encoded |data|, using the given |
| 59 // |password|. Returns a net error code on failure. | 59 // |password|. Returns a net error code on failure. |
| 60 int ImportFromPKCS12(const std::string& data, const string16& password); | 60 int ImportFromPKCS12(net::CryptoModule* module, const std::string& data, |
| 61 const string16& password); |
| 61 | 62 |
| 62 // Import CA certificates. | 63 // Import CA certificates. |
| 63 // Tries to import all the certificates given. The root will be trusted | 64 // Tries to import all the certificates given. The root will be trusted |
| 64 // according to |trust_bits|. Any certificates that could not be imported | 65 // according to |trust_bits|. Any certificates that could not be imported |
| 65 // will be listed in |not_imported|. | 66 // will be listed in |not_imported|. |
| 66 // |trust_bits| should be a bit field of TRUST_* values from CertDatabase, or | 67 // |trust_bits| should be a bit field of TRUST_* values from CertDatabase, or |
| 67 // UNTRUSTED. | 68 // UNTRUSTED. |
| 68 // Returns false if there is an internal error, otherwise true is returned and | 69 // Returns false if there is an internal error, otherwise true is returned and |
| 69 // |not_imported| should be checked for any certificates that were not | 70 // |not_imported| should be checked for any certificates that were not |
| 70 // imported. | 71 // imported. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 100 net::CertDatabase cert_db_; | 101 net::CertDatabase cert_db_; |
| 101 net::CertificateList cert_list_; | 102 net::CertificateList cert_list_; |
| 102 | 103 |
| 103 // The observer to notify when certificate list is refreshed. | 104 // The observer to notify when certificate list is refreshed. |
| 104 Observer* observer_; | 105 Observer* observer_; |
| 105 | 106 |
| 106 DISALLOW_COPY_AND_ASSIGN(CertificateManagerModel); | 107 DISALLOW_COPY_AND_ASSIGN(CertificateManagerModel); |
| 107 }; | 108 }; |
| 108 | 109 |
| 109 #endif // CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ | 110 #endif // CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ |
| OLD | NEW |