| Index: components/policy/core/common/cloud/cloud_policy_client.cc
|
| diff --git a/components/policy/core/common/cloud/cloud_policy_client.cc b/components/policy/core/common/cloud/cloud_policy_client.cc
|
| index 3014fd7f1585755d8825c7c6ad01341d57aec0e5..fe2d2675a4458ebf17214d41904c2dea15bcbd84 100644
|
| --- a/components/policy/core/common/cloud/cloud_policy_client.cc
|
| +++ b/components/policy/core/common/cloud/cloud_policy_client.cc
|
| @@ -220,7 +220,8 @@ void CloudPolicyClient::FetchPolicy() {
|
|
|
| // Fire the job.
|
| request_job_->Start(base::Bind(&CloudPolicyClient::OnPolicyFetchCompleted,
|
| - base::Unretained(this)));
|
| + base::Unretained(this),
|
| + namespaces_to_fetch_));
|
| }
|
|
|
| void CloudPolicyClient::FetchRobotAuthCodes(const std::string& auth_token) {
|
| @@ -376,6 +377,7 @@ void CloudPolicyClient::OnFetchRobotAuthCodesCompleted(
|
| }
|
|
|
| void CloudPolicyClient::OnPolicyFetchCompleted(
|
| + const NamespaceSet& namespaces_requested,
|
| DeviceManagementStatus status,
|
| int net_error,
|
| const em::DeviceManagementResponse& response) {
|
| @@ -389,9 +391,10 @@ void CloudPolicyClient::OnPolicyFetchCompleted(
|
|
|
| status_ = status;
|
| if (status == DM_STATUS_SUCCESS) {
|
| + namespaces_requested_ = namespaces_requested;
|
| + STLDeleteValues(&responses_);
|
| const em::DevicePolicyResponse& policy_response =
|
| response.policy_response();
|
| - STLDeleteValues(&responses_);
|
| for (int i = 0; i < policy_response.response_size(); ++i) {
|
| const em::PolicyFetchResponse& response = policy_response.response(i);
|
| em::PolicyData policy_data;
|
|
|