| 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 2eadb00a8e4a5989e6958cbe4ceab344347a9877..6773ca38181fec55cf8f43c1e7d571a65f2b1482 100644
|
| --- a/chrome/browser/chromeos/settings/session_manager_operation.cc
|
| +++ b/chrome/browser/chromeos/settings/session_manager_operation.cc
|
| @@ -24,6 +24,8 @@
|
| #include "crypto/rsa_private_key.h"
|
| #include "crypto/signature_creator.h"
|
|
|
| +using RetrievePolicyResponseType =
|
| + chromeos::SessionManagerClient::RetrievePolicyResponseType;
|
| using ownership::OwnerKeyUtil;
|
| using ownership::PublicKey;
|
|
|
| @@ -142,12 +144,15 @@ void SessionManagerOperation::RetrieveDeviceSettings() {
|
| }
|
|
|
| void SessionManagerOperation::BlockingRetrieveDeviceSettings() {
|
| - ValidateDeviceSettings(
|
| - session_manager_client()->BlockingRetrieveDevicePolicy());
|
| + std::string policy_blob;
|
| + RetrievePolicyResponseType response =
|
| + session_manager_client()->BlockingRetrieveDevicePolicy(&policy_blob);
|
| + ValidateDeviceSettings(policy_blob, response);
|
| }
|
|
|
| void SessionManagerOperation::ValidateDeviceSettings(
|
| - const std::string& policy_blob) {
|
| + const std::string& policy_blob,
|
| + RetrievePolicyResponseType response_type) {
|
| std::unique_ptr<em::PolicyFetchResponse> policy(
|
| new em::PolicyFetchResponse());
|
| if (policy_blob.empty()) {
|
| @@ -155,8 +160,7 @@ void SessionManagerOperation::ValidateDeviceSettings(
|
| return;
|
| }
|
|
|
| - if (!policy->ParseFromString(policy_blob) ||
|
| - !policy->IsInitialized()) {
|
| + if (!policy->ParseFromString(policy_blob) || !policy->IsInitialized()) {
|
| ReportResult(DeviceSettingsService::STORE_INVALID_POLICY);
|
| return;
|
| }
|
|
|