Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Unified Diff: components/policy/core/common/cloud/user_cloud_policy_store_base.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/policy/core/common/cloud/user_cloud_policy_store_base.cc
diff --git a/components/policy/core/common/cloud/user_cloud_policy_store_base.cc b/components/policy/core/common/cloud/user_cloud_policy_store_base.cc
index 3b9af52295f7b3b3fa397c9ef5117a7e707b8ed6..9384eeec23437f5fbb3cb8b394c2c2c755dc50d7 100644
--- a/components/policy/core/common/cloud/user_cloud_policy_store_base.cc
+++ b/components/policy/core/common/cloud/user_cloud_policy_store_base.cc
@@ -4,6 +4,8 @@
#include "components/policy/core/common/cloud/user_cloud_policy_store_base.h"
+#include <utility>
+
#include "components/policy/core/common/cloud/cloud_external_data_manager.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/core/common/policy_map.h"
@@ -28,8 +30,8 @@ scoped_ptr<UserCloudPolicyValidator> UserCloudPolicyStoreBase::CreateValidator(
scoped_ptr<enterprise_management::PolicyFetchResponse> policy,
CloudPolicyValidatorBase::ValidateTimestampOption timestamp_option) {
// Configure the validator.
- UserCloudPolicyValidator* validator =
- UserCloudPolicyValidator::Create(policy.Pass(), background_task_runner_);
+ UserCloudPolicyValidator* validator = UserCloudPolicyValidator::Create(
+ std::move(policy), background_task_runner_);
validator->ValidatePolicyType(dm_protocol::kChromeUserPolicyType);
validator->ValidateAgainstCurrentPolicy(
policy_.get(),
@@ -45,7 +47,7 @@ void UserCloudPolicyStoreBase::InstallPolicy(
// Decode the payload.
policy_map_.Clear();
DecodePolicy(*payload, external_data_manager(), &policy_map_);
- policy_ = policy_data.Pass();
+ policy_ = std::move(policy_data);
}
} // namespace policy

Powered by Google App Engine
This is Rietveld 408576698