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

Unified Diff: components/policy/core/common/config_dir_policy_loader_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/config_dir_policy_loader_unittest.cc
diff --git a/components/policy/core/common/config_dir_policy_loader_unittest.cc b/components/policy/core/common/config_dir_policy_loader_unittest.cc
index 3afc8b2695617eaeaf58b7bf369f45b037b7a1c2..dfa12b26d67a2f05888ff1c4dde41659a10a2160 100644
--- a/components/policy/core/common/config_dir_policy_loader_unittest.cc
+++ b/components/policy/core/common/config_dir_policy_loader_unittest.cc
@@ -87,8 +87,8 @@ void TestHarness::SetUp() {
ConfigurationPolicyProvider* TestHarness::CreateProvider(
SchemaRegistry* registry,
scoped_refptr<base::SequencedTaskRunner> task_runner) {
- scoped_ptr<AsyncPolicyLoader> loader(new ConfigDirPolicyLoader(
- task_runner, test_dir(), POLICY_SCOPE_MACHINE));
+ std::unique_ptr<AsyncPolicyLoader> loader(
+ new ConfigDirPolicyLoader(task_runner, test_dir(), POLICY_SCOPE_MACHINE));
return new AsyncPolicyProvider(registry, std::move(loader));
}
@@ -191,7 +191,7 @@ class ConfigDirPolicyLoaderTest : public PolicyTestBase {
TEST_F(ConfigDirPolicyLoaderTest, ReadPrefsEmpty) {
ConfigDirPolicyLoader loader(loop_.task_runner(), harness_.test_dir(),
POLICY_SCOPE_MACHINE);
- scoped_ptr<PolicyBundle> bundle(loader.Load());
+ std::unique_ptr<PolicyBundle> bundle(loader.Load());
ASSERT_TRUE(bundle.get());
const PolicyBundle kEmptyBundle;
EXPECT_TRUE(bundle->Equals(kEmptyBundle));
@@ -204,7 +204,7 @@ TEST_F(ConfigDirPolicyLoaderTest, ReadPrefsNonExistentDirectory) {
harness_.test_dir().Append(FILE_PATH_LITERAL("not_there")));
ConfigDirPolicyLoader loader(loop_.task_runner(), non_existent_dir,
POLICY_SCOPE_MACHINE);
- scoped_ptr<PolicyBundle> bundle(loader.Load());
+ std::unique_ptr<PolicyBundle> bundle(loader.Load());
ASSERT_TRUE(bundle.get());
const PolicyBundle kEmptyBundle;
EXPECT_TRUE(bundle->Equals(kEmptyBundle));
@@ -228,7 +228,7 @@ TEST_F(ConfigDirPolicyLoaderTest, ReadPrefsMergePrefs) {
ConfigDirPolicyLoader loader(loop_.task_runner(), harness_.test_dir(),
POLICY_SCOPE_USER);
- scoped_ptr<PolicyBundle> bundle(loader.Load());
+ std::unique_ptr<PolicyBundle> bundle(loader.Load());
ASSERT_TRUE(bundle.get());
PolicyBundle expected_bundle;
expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))

Powered by Google App Engine
This is Rietveld 408576698