Index: chrome/browser/chromeos/policy/device_local_account_policy_store.cc |
diff --git a/chrome/browser/chromeos/policy/device_local_account_policy_store.cc b/chrome/browser/chromeos/policy/device_local_account_policy_store.cc |
index 31f42df64268d730dab40792c82127a1b18fd5f1..cac2df687df9f75f3e1ab09546f6546c3c0b2c93 100644 |
--- a/chrome/browser/chromeos/policy/device_local_account_policy_store.cc |
+++ b/chrome/browser/chromeos/policy/device_local_account_policy_store.cc |
@@ -9,7 +9,6 @@ |
#include "base/bind.h" |
#include "base/callback.h" |
#include "base/memory/ptr_util.h" |
-#include "chromeos/dbus/session_manager_client.h" |
#include "components/ownership/owner_key_util.h" |
#include "components/policy/core/common/cloud/device_management_service.h" |
#include "components/policy/core/common/external_data_fetcher.h" |
@@ -56,10 +55,12 @@ void DeviceLocalAccountPolicyStore::LoadImmediately() { |
// Cancel all running async loads. |
weak_factory_.InvalidateWeakPtrs(); |
- const std::string policy_blob = |
+ std::string policy_blob; |
+ chromeos::SessionManagerClient::RetrievePolicyResponseType response = |
session_manager_client_->BlockingRetrieveDeviceLocalAccountPolicy( |
- account_id_); |
- ValidateLoadedPolicyBlob(false /*validate_in_background*/, policy_blob); |
+ account_id_, &policy_blob); |
+ ValidateLoadedPolicyBlob(false /*validate_in_background*/, policy_blob, |
+ response); |
} |
void DeviceLocalAccountPolicyStore::Store( |
@@ -74,8 +75,11 @@ void DeviceLocalAccountPolicyStore::Store( |
void DeviceLocalAccountPolicyStore::ValidateLoadedPolicyBlob( |
bool validate_in_background, |
- const std::string& policy_blob) { |
- if (policy_blob.empty()) { |
+ const std::string& policy_blob, |
+ chromeos::SessionManagerClient::RetrievePolicyResponseType response_type) { |
+ if (response_type != |
+ chromeos::SessionManagerClient::RetrievePolicyResponseType::SUCCESS || |
+ policy_blob.empty()) { |
status_ = CloudPolicyStore::STATUS_LOAD_ERROR; |
NotifyStoreError(); |
} else { |