| Index: chrome/browser/chromeos/settings/session_manager_operation.cc
|
| diff --git a/chrome/browser/chromeos/settings/session_manager_operation.cc b/chrome/browser/chromeos/settings/session_manager_operation.cc
|
| index 33832aa31e7ac08f8b8b6c25266c669ba98c1160..436ea0f416c62788a38e2fbb6870e72dd8237a04 100644
|
| --- a/chrome/browser/chromeos/settings/session_manager_operation.cc
|
| +++ b/chrome/browser/chromeos/settings/session_manager_operation.cc
|
| @@ -251,23 +251,22 @@
|
| SignAndStoreSettingsOperation::~SignAndStoreSettingsOperation() {}
|
|
|
| void SignAndStoreSettingsOperation::Run() {
|
| - if (!owner_settings_service_) {
|
| - ReportResult(DeviceSettingsService::STORE_KEY_UNAVAILABLE);
|
| - return;
|
| - }
|
| - owner_settings_service_->IsOwnerAsync(
|
| + if (!delegate_) {
|
| + ReportResult(DeviceSettingsService::STORE_KEY_UNAVAILABLE);
|
| + return;
|
| + }
|
| + delegate_->IsOwnerAsync(
|
| base::Bind(&SignAndStoreSettingsOperation::StartSigning,
|
| weak_factory_.GetWeakPtr()));
|
| }
|
|
|
| void SignAndStoreSettingsOperation::StartSigning(bool is_owner) {
|
| - if (!owner_settings_service_ || !is_owner) {
|
| - ReportResult(DeviceSettingsService::STORE_KEY_UNAVAILABLE);
|
| - return;
|
| - }
|
| -
|
| - bool rv = owner_settings_service_->AssembleAndSignPolicyAsync(
|
| - content::BrowserThread::GetBlockingPool(),
|
| + if (!delegate_ || !is_owner) {
|
| + ReportResult(DeviceSettingsService::STORE_KEY_UNAVAILABLE);
|
| + return;
|
| + }
|
| +
|
| + bool rv = delegate_->AssembleAndSignPolicyAsync(
|
| new_policy_.Pass(),
|
| base::Bind(&SignAndStoreSettingsOperation::StoreDeviceSettingsBlob,
|
| weak_factory_.GetWeakPtr()));
|
|
|