| 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 aaf5315ee1b06bcb0e29760675464c74a7ce0310..31f42df64268d730dab40792c82127a1b18fd5f1 100644
|
| --- a/chrome/browser/chromeos/policy/device_local_account_policy_store.cc
|
| +++ b/chrome/browser/chromeos/policy/device_local_account_policy_store.cc
|
| @@ -9,6 +9,7 @@
|
| #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"
|
| @@ -17,9 +18,6 @@
|
| #include "components/policy/proto/cloud_policy.pb.h"
|
| #include "components/policy/proto/device_management_backend.pb.h"
|
|
|
| -using RetrievePolicyResponseType =
|
| - chromeos::SessionManagerClient::RetrievePolicyResponseType;
|
| -
|
| namespace em = enterprise_management;
|
|
|
| namespace policy {
|
| @@ -58,12 +56,10 @@ void DeviceLocalAccountPolicyStore::LoadImmediately() {
|
| // Cancel all running async loads.
|
| weak_factory_.InvalidateWeakPtrs();
|
|
|
| - std::string policy_blob;
|
| - RetrievePolicyResponseType response =
|
| + const std::string policy_blob =
|
| session_manager_client_->BlockingRetrieveDeviceLocalAccountPolicy(
|
| - account_id_, &policy_blob);
|
| - ValidateLoadedPolicyBlob(false /*validate_in_background*/, policy_blob,
|
| - response);
|
| + account_id_);
|
| + ValidateLoadedPolicyBlob(false /*validate_in_background*/, policy_blob);
|
| }
|
|
|
| void DeviceLocalAccountPolicyStore::Store(
|
| @@ -78,10 +74,8 @@ void DeviceLocalAccountPolicyStore::Store(
|
|
|
| void DeviceLocalAccountPolicyStore::ValidateLoadedPolicyBlob(
|
| bool validate_in_background,
|
| - const std::string& policy_blob,
|
| - RetrievePolicyResponseType response_type) {
|
| - if (response_type != RetrievePolicyResponseType::SUCCESS ||
|
| - policy_blob.empty()) {
|
| + const std::string& policy_blob) {
|
| + if (policy_blob.empty()) {
|
| status_ = CloudPolicyStore::STATUS_LOAD_ERROR;
|
| NotifyStoreError();
|
| } else {
|
|
|