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

Unified Diff: components/policy/core/common/schema_registry_tracking_policy_provider_unittest.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/schema_registry_tracking_policy_provider_unittest.cc
diff --git a/components/policy/core/common/schema_registry_tracking_policy_provider_unittest.cc b/components/policy/core/common/schema_registry_tracking_policy_provider_unittest.cc
index a67b63be7923fd82fea3e3b63b9dc76d8fa9f2df..4cad51709bda8447bca2a7a21c8a6e1f51d16f10 100644
--- a/components/policy/core/common/schema_registry_tracking_policy_provider_unittest.cc
+++ b/components/policy/core/common/schema_registry_tracking_policy_provider_unittest.cc
@@ -5,6 +5,7 @@
#include "components/policy/core/common/schema_registry_tracking_policy_provider.h"
#include <string>
+#include <utility>
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
@@ -100,7 +101,7 @@ TEST_F(SchemaRegistryTrackingPolicyProviderTest, PassOnChromePolicy) {
POLICY_SOURCE_CLOUD,
new base::StringValue("not visible"),
NULL);
- mock_provider_.UpdatePolicy(delegate_bundle.Pass());
+ mock_provider_.UpdatePolicy(std::move(delegate_bundle));
Mock::VerifyAndClearExpectations(&observer_);
EXPECT_FALSE(schema_registry_tracking_provider_.IsInitializationComplete(
@@ -137,7 +138,7 @@ TEST_F(SchemaRegistryTrackingPolicyProviderTest, SchemaReadyWithComponents) {
bundle->Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, "xyz"))
.CopyFrom(policy_map);
EXPECT_CALL(observer_, OnUpdatePolicy(&schema_registry_tracking_provider_));
- mock_provider_.UpdatePolicy(bundle.Pass());
+ mock_provider_.UpdatePolicy(std::move(bundle));
Mock::VerifyAndClearExpectations(&observer_);
EXPECT_CALL(mock_provider_, RefreshPolicies()).Times(0);
@@ -231,7 +232,7 @@ TEST_F(SchemaRegistryTrackingPolicyProviderTest, RemoveAndAddComponent) {
scoped_ptr<PolicyBundle> copy(new PolicyBundle);
copy->CopyFrom(platform_policy);
EXPECT_CALL(observer_, OnUpdatePolicy(_));
- mock_provider_.UpdatePolicy(copy.Pass());
+ mock_provider_.UpdatePolicy(std::move(copy));
Mock::VerifyAndClearExpectations(&observer_);
EXPECT_TRUE(
schema_registry_tracking_provider_.policies().Equals(platform_policy));
@@ -252,7 +253,7 @@ TEST_F(SchemaRegistryTrackingPolicyProviderTest, RemoveAndAddComponent) {
EXPECT_CALL(observer_, OnUpdatePolicy(_));
copy.reset(new PolicyBundle);
copy->CopyFrom(platform_policy);
- mock_provider_.UpdatePolicy(copy.Pass());
+ mock_provider_.UpdatePolicy(std::move(copy));
Mock::VerifyAndClearExpectations(&observer_);
EXPECT_TRUE(
schema_registry_tracking_provider_.policies().Equals(platform_policy));

Powered by Google App Engine
This is Rietveld 408576698