| 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 ed847589209fa0736305c5404076c0db125bdf0a..f70c6aec73bcffb67c9dc88238a0de1a7398359e 100644
|
| --- a/chrome/browser/chromeos/settings/session_manager_operation.cc
|
| +++ b/chrome/browser/chromeos/settings/session_manager_operation.cc
|
| @@ -138,21 +138,27 @@ void SessionManagerOperation::RetrieveDeviceSettings() {
|
| }
|
|
|
| void SessionManagerOperation::BlockingRetrieveDeviceSettings() {
|
| - ValidateDeviceSettings(
|
| - session_manager_client()->BlockingRetrieveDevicePolicy());
|
| + std::string policy_blob;
|
| + chromeos::SessionManagerClient::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,
|
| + chromeos::SessionManagerClient::RetrievePolicyResponseType response_type) {
|
| std::unique_ptr<em::PolicyFetchResponse> policy(
|
| new em::PolicyFetchResponse());
|
| - if (policy_blob.empty()) {
|
| + if (policy_blob.empty() &&
|
| + response_type ==
|
| + SessionManagerClient::RetrievePolicyResponseType::SUCCESS) {
|
| ReportResult(DeviceSettingsService::STORE_NO_POLICY);
|
| return;
|
| }
|
|
|
| - if (!policy->ParseFromString(policy_blob) ||
|
| - !policy->IsInitialized()) {
|
| + if (response_type !=
|
| + SessionManagerClient::RetrievePolicyResponseType::SUCCESS ||
|
| + !policy->ParseFromString(policy_blob) || !policy->IsInitialized()) {
|
| ReportResult(DeviceSettingsService::STORE_INVALID_POLICY);
|
| return;
|
| }
|
|
|