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

Unified Diff: components/policy/core/common/async_policy_provider.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/async_policy_provider.cc
diff --git a/components/policy/core/common/async_policy_provider.cc b/components/policy/core/common/async_policy_provider.cc
index ae08b209efb78d754da5910356821d7513d00c43..80e1be8401fd08756488305c91e2e22d973cd864 100644
--- a/components/policy/core/common/async_policy_provider.cc
+++ b/components/policy/core/common/async_policy_provider.cc
@@ -4,6 +4,8 @@
#include "components/policy/core/common/async_policy_provider.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/location.h"
@@ -16,11 +18,9 @@
namespace policy {
-AsyncPolicyProvider::AsyncPolicyProvider(
- SchemaRegistry* registry,
- scoped_ptr<AsyncPolicyLoader> loader)
- : loader_(loader.Pass()),
- weak_factory_(this) {
+AsyncPolicyProvider::AsyncPolicyProvider(SchemaRegistry* registry,
+ scoped_ptr<AsyncPolicyLoader> loader)
+ : loader_(std::move(loader)), weak_factory_(this) {
// Make an immediate synchronous load on startup.
OnLoaderReloaded(loader_->InitialLoad(registry->schema_map()));
}
@@ -115,7 +115,7 @@ void AsyncPolicyProvider::OnLoaderReloaded(scoped_ptr<PolicyBundle> bundle) {
// Only propagate policy updates if there are no pending refreshes, and if
// Shutdown() hasn't been called yet.
if (refresh_callback_.IsCancelled() && loader_)
- UpdatePolicy(bundle.Pass());
+ UpdatePolicy(std::move(bundle));
}
// static
« no previous file with comments | « components/policy/core/common/async_policy_loader.cc ('k') | components/policy/core/common/async_policy_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698