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

Unified Diff: components/policy/core/common/cloud/user_cloud_policy_manager.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_manager.cc
diff --git a/components/policy/core/common/cloud/user_cloud_policy_manager.cc b/components/policy/core/common/cloud/user_cloud_policy_manager.cc
index 416d9b21e52f1959358efe03b24deefe9c92e4f7..672ad3f125e9df1fd53a6b04b69c28395929e7ce 100644
--- a/components/policy/core/common/cloud/user_cloud_policy_manager.cc
+++ b/components/policy/core/common/cloud/user_cloud_policy_manager.cc
@@ -4,6 +4,8 @@
#include "components/policy/core/common/cloud/user_cloud_policy_manager.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/sequenced_task_runner.h"
@@ -32,10 +34,9 @@ UserCloudPolicyManager::UserCloudPolicyManager(
task_runner,
file_task_runner,
io_task_runner),
- store_(store.Pass()),
+ store_(std::move(store)),
component_policy_cache_path_(component_policy_cache_path),
- external_data_manager_(external_data_manager.Pass()) {
-}
+ external_data_manager_(std::move(external_data_manager)) {}
UserCloudPolicyManager::~UserCloudPolicyManager() {}
@@ -55,7 +56,7 @@ void UserCloudPolicyManager::Connect(
scoped_ptr<CloudPolicyClient> client) {
CreateComponentCloudPolicyService(component_policy_cache_path_,
request_context, client.get());
- core()->Connect(client.Pass());
+ core()->Connect(std::move(client));
core()->StartRefreshScheduler();
core()->TrackRefreshDelayPref(local_state,
policy_prefs::kUserPolicyRefreshRate);
@@ -68,13 +69,9 @@ scoped_ptr<CloudPolicyClient>
UserCloudPolicyManager::CreateCloudPolicyClient(
DeviceManagementService* device_management_service,
scoped_refptr<net::URLRequestContextGetter> request_context) {
- return make_scoped_ptr(
- new CloudPolicyClient(
- std::string(),
- std::string(),
- kPolicyVerificationKeyHash,
- device_management_service,
- request_context)).Pass();
+ return make_scoped_ptr(new CloudPolicyClient(
+ std::string(), std::string(), kPolicyVerificationKeyHash,
+ device_management_service, request_context));
}
void UserCloudPolicyManager::DisconnectAndRemovePolicy() {

Powered by Google App Engine
This is Rietveld 408576698