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