Index: chrome/browser/certificate_manager_model.h |
diff --git a/chrome/browser/certificate_manager_model.h b/chrome/browser/certificate_manager_model.h |
index 64fcb2c467339cbe403850183e33d0ba1d7babbe..938c6e1f7b138e96fe5138d1518ccae525488a48 100644 |
--- a/chrome/browser/certificate_manager_model.h |
+++ b/chrome/browser/certificate_manager_model.h |
@@ -12,7 +12,9 @@ |
#include "base/callback.h" |
#include "base/macros.h" |
#include "base/memory/ref_counted.h" |
+#include "base/memory/weak_ptr.h" |
#include "base/strings/string16.h" |
+#include "chrome/browser/chromeos/certificate_provider/certificate_provider.h" |
#include "net/cert/nss_cert_database.h" |
namespace content { |
@@ -132,7 +134,8 @@ class CertificateManagerModel { |
CertificateManagerModel(net::NSSCertDatabase* nss_cert_database, |
bool is_user_db_available, |
bool is_tpm_available, |
- Observer* observer); |
+ Observer* observer, |
+ content::BrowserContext* browser_context); |
// Methods used during initialization, see the comment at the top of the .cc |
// file for details. |
@@ -141,21 +144,28 @@ class CertificateManagerModel { |
bool is_user_db_available, |
bool is_tpm_available, |
CertificateManagerModel::Observer* observer, |
+ content::BrowserContext* browser_context, |
const CreationCallback& callback); |
static void DidGetCertDBOnIOThread( |
CertificateManagerModel::Observer* observer, |
+ content::BrowserContext* browser_context, |
const CreationCallback& callback, |
net::NSSCertDatabase* cert_db); |
static void GetCertDBOnIOThread(content::ResourceContext* context, |
CertificateManagerModel::Observer* observer, |
+ content::BrowserContext* browser_context, |
const CreationCallback& callback); |
// Callback used by Refresh() for when the cert slots have been unlocked. |
// This method does the actual refreshing. |
void RefreshSlotsUnlocked(); |
+ // Callback used to refresh extension provided certificates. Refreshes UI. |
+ void RefreshExtensionCertificates(const net::CertificateList& new_certs); |
+ |
net::NSSCertDatabase* cert_db_; |
net::CertificateList cert_list_; |
+ net::CertificateList extension_cert_list_; |
// Whether the certificate database has a public slot associated with the |
// profile. If not set, importing certificates is not allowed with this model. |
bool is_user_db_available_; |
@@ -164,6 +174,11 @@ class CertificateManagerModel { |
// The observer to notify when certificate list is refreshed. |
Observer* observer_; |
+ // Certificate provider used to fetch extension provided certificates. |
+ std::unique_ptr<chromeos::CertificateProvider> certificate_provider_; |
+ |
+ base::WeakPtrFactory<CertificateManagerModel> weak_ptr_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(CertificateManagerModel); |
}; |