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

Unified Diff: components/policy/core/common/schema_registry_tracking_policy_provider_unittest.cc

Issue 1902633006: Convert //components/policy from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and use namespace alias Created 4 years, 8 months 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 4cad51709bda8447bca2a7a21c8a6e1f51d16f10..de8dcd151610389a80d1891f52cdd39b847bef45 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
@@ -4,10 +4,10 @@
#include "components/policy/core/common/schema_registry_tracking_policy_provider.h"
+#include <memory>
#include <string>
#include <utility>
-#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "components/policy/core/common/mock_configuration_policy_provider.h"
#include "components/policy/core/common/policy_bundle.h"
@@ -92,7 +92,7 @@ TEST_F(SchemaRegistryTrackingPolicyProviderTest, PassOnChromePolicy) {
NULL);
EXPECT_CALL(observer_, OnUpdatePolicy(&schema_registry_tracking_provider_));
- scoped_ptr<PolicyBundle> delegate_bundle(new PolicyBundle);
+ std::unique_ptr<PolicyBundle> delegate_bundle(new PolicyBundle);
delegate_bundle->CopyFrom(bundle);
delegate_bundle->Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, "xyz"))
.Set("foo",
@@ -133,7 +133,7 @@ TEST_F(SchemaRegistryTrackingPolicyProviderTest, SchemaReadyWithComponents) {
POLICY_SOURCE_CLOUD,
new base::StringValue("omg"),
NULL);
- scoped_ptr<PolicyBundle> bundle(new PolicyBundle);
+ std::unique_ptr<PolicyBundle> bundle(new PolicyBundle);
bundle->Get(PolicyNamespace(POLICY_DOMAIN_CHROME, "")).CopyFrom(policy_map);
bundle->Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, "xyz"))
.CopyFrom(policy_map);
@@ -229,7 +229,7 @@ TEST_F(SchemaRegistryTrackingPolicyProviderTest, RemoveAndAddComponent) {
POLICY_SOURCE_CLOUD,
new base::StringValue("omg"),
NULL);
- scoped_ptr<PolicyBundle> copy(new PolicyBundle);
+ std::unique_ptr<PolicyBundle> copy(new PolicyBundle);
copy->CopyFrom(platform_policy);
EXPECT_CALL(observer_, OnUpdatePolicy(_));
mock_provider_.UpdatePolicy(std::move(copy));

Powered by Google App Engine
This is Rietveld 408576698