| Index: chromeos/dbus/fake_session_manager_client.cc
|
| diff --git a/chromeos/dbus/fake_session_manager_client.cc b/chromeos/dbus/fake_session_manager_client.cc
|
| index 53f5796727e42fda19156a3832e5c3c05da10297..a2e32c89d18161286e1f7f36b6861066aea4b98b 100644
|
| --- a/chromeos/dbus/fake_session_manager_client.cc
|
| +++ b/chromeos/dbus/fake_session_manager_client.cc
|
| @@ -17,6 +17,9 @@
|
| #include "chromeos/dbus/cryptohome_client.h"
|
| #include "components/policy/proto/device_management_backend.pb.h"
|
|
|
| +using RetrievePolicyResponseType =
|
| + chromeos::FakeSessionManagerClient::RetrievePolicyResponseType;
|
| +
|
| namespace chromeos {
|
|
|
| namespace {
|
| @@ -128,36 +131,47 @@ void FakeSessionManagerClient::RetrieveActiveSessions(
|
| void FakeSessionManagerClient::RetrieveDevicePolicy(
|
| const RetrievePolicyCallback& callback) {
|
| base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| - FROM_HERE, base::Bind(callback, device_policy_));
|
| + FROM_HERE, base::Bind(callback, device_policy_,
|
| + RetrievePolicyResponseType::SUCCESS));
|
| }
|
|
|
| -std::string FakeSessionManagerClient::BlockingRetrieveDevicePolicy() {
|
| - return device_policy_;
|
| +RetrievePolicyResponseType
|
| +FakeSessionManagerClient::BlockingRetrieveDevicePolicy(
|
| + std::string* policy_out) {
|
| + *policy_out = device_policy_;
|
| + return RetrievePolicyResponseType::SUCCESS;
|
| }
|
|
|
| void FakeSessionManagerClient::RetrievePolicyForUser(
|
| const cryptohome::Identification& cryptohome_id,
|
| const RetrievePolicyCallback& callback) {
|
| base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| - FROM_HERE, base::Bind(callback, user_policies_[cryptohome_id]));
|
| + FROM_HERE, base::Bind(callback, user_policies_[cryptohome_id],
|
| + RetrievePolicyResponseType::SUCCESS));
|
| }
|
|
|
| -std::string FakeSessionManagerClient::BlockingRetrievePolicyForUser(
|
| - const cryptohome::Identification& cryptohome_id) {
|
| - return user_policies_[cryptohome_id];
|
| +RetrievePolicyResponseType
|
| +FakeSessionManagerClient::BlockingRetrievePolicyForUser(
|
| + const cryptohome::Identification& cryptohome_id,
|
| + std::string* policy_out) {
|
| + *policy_out = user_policies_[cryptohome_id];
|
| + return RetrievePolicyResponseType::SUCCESS;
|
| }
|
|
|
| void FakeSessionManagerClient::RetrieveDeviceLocalAccountPolicy(
|
| const std::string& account_id,
|
| const RetrievePolicyCallback& callback) {
|
| base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| - FROM_HERE,
|
| - base::Bind(callback, device_local_account_policy_[account_id]));
|
| + FROM_HERE, base::Bind(callback, device_local_account_policy_[account_id],
|
| + RetrievePolicyResponseType::SUCCESS));
|
| }
|
|
|
| -std::string FakeSessionManagerClient::BlockingRetrieveDeviceLocalAccountPolicy(
|
| - const std::string& account_id) {
|
| - return device_local_account_policy_[account_id];
|
| +RetrievePolicyResponseType
|
| +FakeSessionManagerClient::BlockingRetrieveDeviceLocalAccountPolicy(
|
| + const std::string& account_id,
|
| + std::string* policy_out) {
|
| + *policy_out = device_local_account_policy_[account_id];
|
| + return RetrievePolicyResponseType::SUCCESS;
|
| }
|
|
|
| void FakeSessionManagerClient::StoreDevicePolicy(
|
|
|