| 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 13 matching lines...) Expand all Loading... |
| 24 // Enumeration of the possible columns in the certificate manager tree view. | 24 // Enumeration of the possible columns in the certificate manager tree view. |
| 25 enum Column { | 25 enum Column { |
| 26 COL_SUBJECT_NAME, | 26 COL_SUBJECT_NAME, |
| 27 COL_CERTIFICATE_STORE, | 27 COL_CERTIFICATE_STORE, |
| 28 COL_SERIAL_NUMBER, | 28 COL_SERIAL_NUMBER, |
| 29 COL_EXPIRES_ON, | 29 COL_EXPIRES_ON, |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 class Observer { | 32 class Observer { |
| 33 public: | 33 public: |
| 34 virtual ~Observer() { } |
| 35 |
| 34 // Called to notify the view that the certificate list has been refreshed. | 36 // Called to notify the view that the certificate list has been refreshed. |
| 35 // TODO(mattm): do a more granular updating strategy? Maybe retrieve new | 37 // TODO(mattm): do a more granular updating strategy? Maybe retrieve new |
| 36 // list of certs, diff against past list, and then notify of the changes? | 38 // list of certs, diff against past list, and then notify of the changes? |
| 37 virtual void CertificatesRefreshed() = 0; | 39 virtual void CertificatesRefreshed() = 0; |
| 38 }; | 40 }; |
| 39 | 41 |
| 40 explicit CertificateManagerModel(Observer* observer); | 42 explicit CertificateManagerModel(Observer* observer); |
| 41 ~CertificateManagerModel(); | 43 ~CertificateManagerModel(); |
| 42 | 44 |
| 43 // Accessor for read-only access to the underlying NSSCertDatabase. | 45 // Accessor for read-only access to the underlying NSSCertDatabase. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 net::NSSCertDatabase* cert_db_; | 116 net::NSSCertDatabase* cert_db_; |
| 115 net::CertificateList cert_list_; | 117 net::CertificateList cert_list_; |
| 116 | 118 |
| 117 // The observer to notify when certificate list is refreshed. | 119 // The observer to notify when certificate list is refreshed. |
| 118 Observer* observer_; | 120 Observer* observer_; |
| 119 | 121 |
| 120 DISALLOW_COPY_AND_ASSIGN(CertificateManagerModel); | 122 DISALLOW_COPY_AND_ASSIGN(CertificateManagerModel); |
| 121 }; | 123 }; |
| 122 | 124 |
| 123 #endif // CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ | 125 #endif // CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ |
| OLD | NEW |