OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ |
6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "base/threading/thread_checker.h" | |
13 #include "chromeos/cert_loader.h" | 12 #include "chromeos/cert_loader.h" |
14 #include "net/cert/x509_certificate.h" | 13 #include "net/cert/x509_certificate.h" |
15 | 14 |
16 namespace chromeos { | 15 namespace chromeos { |
17 | 16 |
18 // This class is responsible for keeping track of certificates in a UI | 17 // This class is responsible for keeping track of certificates in a UI |
19 // friendly manner. It observes CertLoader to receive certificate list | 18 // friendly manner. It observes CertLoader to receive certificate list |
20 // updates and sorts them by type for the UI. All public APIs are expected | 19 // updates and sorts them by type for the UI. All public APIs are expected |
21 // to be called from the UI thread and are non blocking. Observers will also | 20 // to be called from the UI thread and are non blocking. Observers will also |
22 // be called on the UI thread. | 21 // be called on the UI thread. |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 const net::CertificateList& GetCertificateListForType(CertType type) const; | 89 const net::CertificateList& GetCertificateListForType(CertType type) const; |
91 | 90 |
92 base::ObserverList<CertLibrary::Observer> observer_list_; | 91 base::ObserverList<CertLibrary::Observer> observer_list_; |
93 | 92 |
94 // Sorted certificate lists | 93 // Sorted certificate lists |
95 net::CertificateList certs_; | 94 net::CertificateList certs_; |
96 net::CertificateList user_certs_; | 95 net::CertificateList user_certs_; |
97 net::CertificateList server_certs_; | 96 net::CertificateList server_certs_; |
98 net::CertificateList server_ca_certs_; | 97 net::CertificateList server_ca_certs_; |
99 | 98 |
100 THREAD_CHECKER(thread_checker_); | |
101 | |
102 DISALLOW_COPY_AND_ASSIGN(CertLibrary); | 99 DISALLOW_COPY_AND_ASSIGN(CertLibrary); |
103 }; | 100 }; |
104 | 101 |
105 } // namespace chromeos | 102 } // namespace chromeos |
106 | 103 |
107 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ | 104 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ |
OLD | NEW |