Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Unified Diff: chrome/browser/chromeos/cros/cert_library.cc

Issue 8771019: Don't require login to enable CA cert settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use CertLibrary::CertificatesLoading() instead Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/cros/cert_library.h ('k') | chrome/browser/chromeos/options/wifi_config_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros/cert_library.cc
diff --git a/chrome/browser/chromeos/cros/cert_library.cc b/chrome/browser/chromeos/cros/cert_library.cc
index 48c6e9f8f1fced8437acfb68402bdb3afa83ac35..96849e90b89df592765ee86faf0af88d5cd3381e 100644
--- a/chrome/browser/chromeos/cros/cert_library.cc
+++ b/chrome/browser/chromeos/cros/cert_library.cc
@@ -77,6 +77,7 @@ class CertLibraryImpl
CertLibraryImpl() :
observer_list_(new CertLibraryObserverList),
user_logged_in_(false),
+ certificates_requested_(false),
certificates_loaded_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(certs_(this)),
ALLOW_THIS_IN_INITIALIZER_LIST(user_certs_(this)),
@@ -95,6 +96,8 @@ class CertLibraryImpl
virtual void RequestCertificates() OVERRIDE {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ certificates_requested_ = true;
+
if (!UserManager::Get()->user_is_logged_in()) {
// If we are not logged in, we cannot load any certificates.
// Set 'loaded' to true for the UI, since we are not waiting on loading.
@@ -151,6 +154,10 @@ class CertLibraryImpl
observer_list_->RemoveObserver(observer);
}
+ virtual bool CertificatesLoading() const OVERRIDE {
+ return certificates_requested_ && !certificates_loaded_;
+ }
+
virtual bool CertificatesLoaded() const OVERRIDE {
return certificates_loaded_;
}
@@ -330,6 +337,7 @@ class CertLibraryImpl
// Local state.
bool user_logged_in_;
+ bool certificates_requested_;
bool certificates_loaded_;
// Certificates.
« no previous file with comments | « chrome/browser/chromeos/cros/cert_library.h ('k') | chrome/browser/chromeos/options/wifi_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698