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 0895080c4f5b53dc585217054962ec7d632475bd..6dcbb69803313d121cc2611e034df9e04d703626 100644 |
--- a/chrome/browser/chromeos/settings/device_settings_service.cc |
+++ b/chrome/browser/chromeos/settings/device_settings_service.cc |
@@ -232,8 +232,10 @@ void DeviceSettingsService::IsCurrentUserOwnerAsync( |
} |
} |
-void DeviceSettingsService::SetUsername(const std::string& username) { |
+void DeviceSettingsService::InitOwner(const std::string& username, |
+ crypto::ScopedPK11Slot slot) { |
username_ = username; |
+ slot_.reset(slot.release()); |
Mattias Nissler (ping if slow)
2014/05/13 11:55:53
nit: slot_ = slot.Pass();
ygorshenin1
2014/05/14 09:10:58
Done.
|
// The private key may have become available, so force a key reload. |
owner_key_ = NULL; |
@@ -292,14 +294,19 @@ void DeviceSettingsService::EnqueueLoad(bool force_key_load) { |
weak_factory_.GetWeakPtr(), |
base::Closure())); |
operation->set_force_key_load(force_key_load); |
+ operation->set_username(username_); |
+ operation->set_slot(slot_.get()); |
Enqueue(operation); |
} |
void DeviceSettingsService::EnsureReload(bool force_key_load) { |
- if (!pending_operations_.empty()) |
+ if (!pending_operations_.empty()) { |
+ pending_operations_.front()->set_username(username_); |
+ pending_operations_.front()->set_slot(slot_.get()); |
pending_operations_.front()->RestartLoad(force_key_load); |
- else |
+ } else { |
EnqueueLoad(force_key_load); |
+ } |
} |
void DeviceSettingsService::StartNextOperation() { |