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 <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
17 #include "net/cert/nss_cert_database.h" | 17 #include "net/cert/nss_cert_database.h" |
| 18 #include "net/ssl/client_cert_identity.h" |
18 | 19 |
19 namespace chromeos { | 20 namespace chromeos { |
20 class CertificateProvider; | 21 class CertificateProvider; |
21 } // namespace chromeos | 22 } // namespace chromeos |
22 | 23 |
23 namespace content { | 24 namespace content { |
24 class BrowserContext; | 25 class BrowserContext; |
25 class ResourceContext; | 26 class ResourceContext; |
26 } // namespace content | 27 } // namespace content |
27 | 28 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 CertificateManagerModel::Observer* observer, | 164 CertificateManagerModel::Observer* observer, |
164 std::unique_ptr<chromeos::CertificateProvider> | 165 std::unique_ptr<chromeos::CertificateProvider> |
165 extension_certificate_provider, | 166 extension_certificate_provider, |
166 const CreationCallback& callback); | 167 const CreationCallback& callback); |
167 | 168 |
168 // Callback used by Refresh() for when the cert slots have been unlocked. | 169 // Callback used by Refresh() for when the cert slots have been unlocked. |
169 // This method does the actual refreshing. | 170 // This method does the actual refreshing. |
170 void RefreshSlotsUnlocked(); | 171 void RefreshSlotsUnlocked(); |
171 | 172 |
172 // Callback used to refresh extension provided certificates. Refreshes UI. | 173 // Callback used to refresh extension provided certificates. Refreshes UI. |
173 void RefreshExtensionCertificates(const net::CertificateList& new_certs); | 174 void RefreshExtensionCertificates( |
| 175 net::ClientCertIdentityList new_cert_identities); |
174 | 176 |
175 net::NSSCertDatabase* cert_db_; | 177 net::NSSCertDatabase* cert_db_; |
176 net::CertificateList cert_list_; | 178 net::CertificateList cert_list_; |
177 net::CertificateList extension_cert_list_; | 179 net::CertificateList extension_cert_list_; |
178 // Whether the certificate database has a public slot associated with the | 180 // Whether the certificate database has a public slot associated with the |
179 // profile. If not set, importing certificates is not allowed with this model. | 181 // profile. If not set, importing certificates is not allowed with this model. |
180 bool is_user_db_available_; | 182 bool is_user_db_available_; |
181 bool is_tpm_available_; | 183 bool is_tpm_available_; |
182 | 184 |
183 // The observer to notify when certificate list is refreshed. | 185 // The observer to notify when certificate list is refreshed. |
184 Observer* observer_; | 186 Observer* observer_; |
185 | 187 |
186 // Certificate provider used to fetch extension provided certificates. | 188 // Certificate provider used to fetch extension provided certificates. |
187 std::unique_ptr<chromeos::CertificateProvider> | 189 std::unique_ptr<chromeos::CertificateProvider> |
188 extension_certificate_provider_; | 190 extension_certificate_provider_; |
189 | 191 |
190 base::WeakPtrFactory<CertificateManagerModel> weak_ptr_factory_; | 192 base::WeakPtrFactory<CertificateManagerModel> weak_ptr_factory_; |
191 | 193 |
192 DISALLOW_COPY_AND_ASSIGN(CertificateManagerModel); | 194 DISALLOW_COPY_AND_ASSIGN(CertificateManagerModel); |
193 }; | 195 }; |
194 | 196 |
195 #endif // CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ | 197 #endif // CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ |
OLD | NEW |