| Index: components/policy/core/common/cloud/component_cloud_policy_store.cc
|
| diff --git a/components/policy/core/common/cloud/component_cloud_policy_store.cc b/components/policy/core/common/cloud/component_cloud_policy_store.cc
|
| index f04df0085575bd8af12e3a510f241dced5ab7bed..15f9c24d8f9f0adb80776bd8de0ad28c51730620 100644
|
| --- a/components/policy/core/common/cloud/component_cloud_policy_store.cc
|
| +++ b/components/policy/core/common/cloud/component_cloud_policy_store.cc
|
| @@ -5,6 +5,7 @@
|
| #include "components/policy/core/common/cloud/component_cloud_policy_store.h"
|
|
|
| #include <stddef.h>
|
| +#include <utility>
|
|
|
| #include "base/callback.h"
|
| #include "base/json/json_reader.h"
|
| @@ -137,8 +138,8 @@ void ComponentCloudPolicyStore::Load() {
|
| scoped_ptr<em::PolicyFetchResponse> proto(new em::PolicyFetchResponse);
|
| em::ExternalPolicyData payload;
|
| if (!proto->ParseFromString(it->second) ||
|
| - !ValidateProto(
|
| - proto.Pass(), constants.policy_type, id, &payload, NULL)) {
|
| + !ValidateProto(std::move(proto), constants.policy_type, id, &payload,
|
| + NULL)) {
|
| Delete(ns);
|
| continue;
|
| }
|
| @@ -253,8 +254,8 @@ bool ComponentCloudPolicyStore::ValidatePolicy(
|
| PolicyNamespace* ns,
|
| em::ExternalPolicyData* payload) {
|
| em::PolicyData policy_data;
|
| - if (!ValidateProto(
|
| - proto.Pass(), std::string(), std::string(), payload, &policy_data)) {
|
| + if (!ValidateProto(std::move(proto), std::string(), std::string(), payload,
|
| + &policy_data)) {
|
| return false;
|
| }
|
|
|
| @@ -282,7 +283,7 @@ bool ComponentCloudPolicyStore::ValidateProto(
|
|
|
| scoped_ptr<ComponentCloudPolicyValidator> validator(
|
| ComponentCloudPolicyValidator::Create(
|
| - proto.Pass(), scoped_refptr<base::SequencedTaskRunner>()));
|
| + std::move(proto), scoped_refptr<base::SequencedTaskRunner>()));
|
| validator->ValidateUsername(username_, true);
|
| validator->ValidateDMToken(dm_token_,
|
| ComponentCloudPolicyValidator::DM_TOKEN_REQUIRED);
|
|
|