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

Unified Diff: chrome/browser/chromeos/settings/device_settings_service.cc

Issue 20130002: Call crypto::InitializeTPMToken on the IO thread (Take 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 5 months 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
Index: chrome/browser/chromeos/settings/device_settings_service.cc
diff --git a/chrome/browser/chromeos/settings/device_settings_service.cc b/chrome/browser/chromeos/settings/device_settings_service.cc
index 8e6ce758768dd221721294e63e066a27ceeb62c1..bbb4339b94b6169c5919792e7999809116e309a6 100644
--- a/chrome/browser/chromeos/settings/device_settings_service.cc
+++ b/chrome/browser/chromeos/settings/device_settings_service.cc
@@ -75,10 +75,14 @@ DeviceSettingsService::DeviceSettingsService()
weak_factory_(this),
store_status_(STORE_SUCCESS),
load_retries_left_(kMaxLoadRetries) {
+ if (CertLoader::IsInitialized())
+ CertLoader::Get()->AddObserver(this);
}
DeviceSettingsService::~DeviceSettingsService() {
DCHECK(pending_operations_.empty());
+ if (CertLoader::IsInitialized())
+ CertLoader::Get()->RemoveObserver(this);
}
void DeviceSettingsService::SetSessionManager(
@@ -208,6 +212,14 @@ void DeviceSettingsService::PropertyChangeComplete(bool success) {
EnsureReload(false);
}
+void DeviceSettingsService::OnCertificatesLoaded(
+ const net::CertificateList& cert_list,
+ bool initial_load) {
+ // CertLoader initializes the TPM and NSS database which is necessary to
+ // determine ownership. Force a reload once we know these are initialized.
+ EnsureReload(true);
+}
+
void DeviceSettingsService::Enqueue(SessionManagerOperation* operation) {
pending_operations_.push_back(operation);
if (pending_operations_.front() == operation)

Powered by Google App Engine
This is Rietveld 408576698