| 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..3715cb5950dc9ac3f26863aed323688f7023380a 100644
|
| --- a/chrome/browser/chromeos/settings/session_manager_operation.cc
|
| +++ b/chrome/browser/chromeos/settings/session_manager_operation.cc
|
| @@ -138,21 +138,24 @@ 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::SUCCESS) {
|
| ReportResult(DeviceSettingsService::STORE_NO_POLICY);
|
| return;
|
| }
|
|
|
| - if (!policy->ParseFromString(policy_blob) ||
|
| - !policy->IsInitialized()) {
|
| + if (response_type != SessionManagerClient::SUCCESS ||
|
| + !policy->ParseFromString(policy_blob) || !policy->IsInitialized()) {
|
| ReportResult(DeviceSettingsService::STORE_INVALID_POLICY);
|
| return;
|
| }
|
|
|