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

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

Issue 640063008: Revert of Implemented OwnerSettingsService::Set() method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « chrome/browser/chromeos/settings/session_manager_operation.h ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6a7ed980cd8d1a2a90b1d69a25aacc991b79b22f..8947c377109cfcf00303516d7ecab8edb881bbf2 100644
--- a/chrome/browser/chromeos/settings/session_manager_operation.cc
+++ b/chrome/browser/chromeos/settings/session_manager_operation.cc
@@ -245,15 +245,12 @@
: SessionManagerOperation(callback),
new_policy_(new_policy.Pass()),
weak_factory_(this) {
+ DCHECK(new_policy_);
}
SignAndStoreSettingsOperation::~SignAndStoreSettingsOperation() {}
void SignAndStoreSettingsOperation::Run() {
- if (!new_policy_) {
- ReportResult(DeviceSettingsService::STORE_POLICY_ERROR);
- return;
- }
if (!owner_settings_service_) {
ReportResult(DeviceSettingsService::STORE_KEY_UNAVAILABLE);
return;
@@ -272,7 +269,7 @@
bool rv = owner_settings_service_->AssembleAndSignPolicyAsync(
content::BrowserThread::GetBlockingPool(),
new_policy_.Pass(),
- base::Bind(&SignAndStoreSettingsOperation::StoreDeviceSettings,
+ base::Bind(&SignAndStoreSettingsOperation::StoreDeviceSettingsBlob,
weak_factory_.GetWeakPtr()));
if (!rv) {
ReportResult(DeviceSettingsService::STORE_KEY_UNAVAILABLE);
@@ -280,15 +277,15 @@
}
}
-void SignAndStoreSettingsOperation::StoreDeviceSettings(
- scoped_ptr<em::PolicyFetchResponse> policy_response) {
- if (!policy_response.get()) {
+void SignAndStoreSettingsOperation::StoreDeviceSettingsBlob(
+ std::string device_settings_blob) {
+ if (device_settings_blob.empty()) {
ReportResult(DeviceSettingsService::STORE_POLICY_ERROR);
return;
}
session_manager_client()->StoreDevicePolicy(
- policy_response->SerializeAsString(),
+ device_settings_blob,
base::Bind(&SignAndStoreSettingsOperation::HandleStoreResult,
weak_factory_.GetWeakPtr()));
}
« no previous file with comments | « chrome/browser/chromeos/settings/session_manager_operation.h ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698