summaryrefslogtreecommitdiffstats
path: root/chrome/browser/certificate_manager_model.h
diff options
context:
space:
mode:
authortbarzic@chromium.org <tbarzic@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-18 01:29:11 +0000
committertbarzic@chromium.org <tbarzic@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-18 01:29:11 +0000
commit16dad0967576c62544c6693d8b517a733b578c75 (patch)
tree4964b47efbb6bf4383b64e5879eda3bf370e4937 /chrome/browser/certificate_manager_model.h
parent7078c49eb20ebef4eade402b98da8ae9586e3ea1 (diff)
downloadchromium_src-16dad0967576c62544c6693d8b517a733b578c75.zip
chromium_src-16dad0967576c62544c6693d8b517a733b578c75.tar.gz
chromium_src-16dad0967576c62544c6693d8b517a733b578c75.tar.bz2
Handle cases when user cert database has NULL slots
The slots can be NULL if the user's username hash is empty string (e.g. in retail mode) BUG=349085,340505 TEST= Retail mode does not immediately restart (i.e. no crash). In retail mode, go to chrome://settings/certificates -> buttons for importing certs should be disabled Review URL: https://codereview.chromium.org/193273002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257570 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/certificate_manager_model.h')
-rw-r--r--chrome/browser/certificate_manager_model.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/certificate_manager_model.h b/chrome/browser/certificate_manager_model.h
index 7364b32..34d0f07 100644
--- a/chrome/browser/certificate_manager_model.h
+++ b/chrome/browser/certificate_manager_model.h
@@ -56,6 +56,7 @@ class CertificateManagerModel {
~CertificateManagerModel();
+ bool is_user_db_available() const { return is_user_db_available_; }
bool is_tpm_available() const { return is_tpm_available_; }
// Accessor for read-only access to the underlying NSSCertDatabase.
@@ -124,6 +125,7 @@ class CertificateManagerModel {
private:
CertificateManagerModel(net::NSSCertDatabase* nss_cert_database,
+ bool is_user_db_available,
bool is_tpm_available,
Observer* observer);
@@ -131,6 +133,7 @@ class CertificateManagerModel {
// file for details.
static void DidGetCertDBOnUIThread(
net::NSSCertDatabase* cert_db,
+ bool is_user_db_available,
bool is_tpm_available,
CertificateManagerModel::Observer* observer,
const CreationCallback& callback);
@@ -148,6 +151,9 @@ class CertificateManagerModel {
net::NSSCertDatabase* cert_db_;
net::CertificateList 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_;
bool is_tpm_available_;
// The observer to notify when certificate list is refreshed.