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

Unified Diff: components/policy/core/common/policy_service_impl_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/policy_service_impl_unittest.cc
diff --git a/components/policy/core/common/policy_service_impl_unittest.cc b/components/policy/core/common/policy_service_impl_unittest.cc
index 321eac2d2dbb2022a91f9f0e8c0c07bda4b1e8aa..d67d876af0bf8b2b3388d534d53e38b9c455c6ea 100644
--- a/components/policy/core/common/policy_service_impl_unittest.cc
+++ b/components/policy/core/common/policy_service_impl_unittest.cc
@@ -4,6 +4,8 @@
#include "components/policy/core/common/policy_service_impl.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback.h"
@@ -336,7 +338,7 @@ TEST_F(PolicyServiceTest, NotifyObserversInMultipleNamespaces) {
OnPolicyUpdated(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, kExtension1),
PolicyEquals(&kEmptyPolicyMap),
PolicyEquals(&policy_map)));
- provider0_.UpdatePolicy(bundle.Pass());
+ provider0_.UpdatePolicy(std::move(bundle));
RunUntilIdle();
Mock::VerifyAndClearExpectations(&chrome_observer);
Mock::VerifyAndClearExpectations(&extension_observer);
@@ -374,7 +376,7 @@ TEST_F(PolicyServiceTest, NotifyObserversInMultipleNamespaces) {
OnPolicyUpdated(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, kExtension2),
PolicyEquals(&kEmptyPolicyMap),
PolicyEquals(&policy_map)));
- provider0_.UpdatePolicy(bundle.Pass());
+ provider0_.UpdatePolicy(std::move(bundle));
RunUntilIdle();
Mock::VerifyAndClearExpectations(&chrome_observer);
Mock::VerifyAndClearExpectations(&extension_observer);
@@ -606,9 +608,9 @@ TEST_F(PolicyServiceTest, NamespaceMerge) {
AddTestPolicies(bundle2.get(), "bundle2",
POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE);
- provider0_.UpdatePolicy(bundle0.Pass());
- provider1_.UpdatePolicy(bundle1.Pass());
- provider2_.UpdatePolicy(bundle2.Pass());
+ provider0_.UpdatePolicy(std::move(bundle0));
+ provider1_.UpdatePolicy(std::move(bundle1));
+ provider2_.UpdatePolicy(std::move(bundle2));
RunUntilIdle();
PolicyMap expected;
@@ -769,7 +771,7 @@ TEST_F(PolicyServiceTest, FixDeprecatedPolicies) {
new base::FundamentalValue(3),
NULL);
- provider0_.UpdatePolicy(policy_bundle.Pass());
+ provider0_.UpdatePolicy(std::move(policy_bundle));
RunUntilIdle();
EXPECT_TRUE(VerifyPolicies(chrome_namespace, expected_chrome));
« no previous file with comments | « components/policy/core/common/policy_map.cc ('k') | components/policy/core/common/remote_commands/remote_command_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698