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

Unified Diff: components/policy/core/common/policy_loader_ios_unittest.mm

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/policy_loader_ios_unittest.mm
diff --git a/components/policy/core/common/policy_loader_ios_unittest.mm b/components/policy/core/common/policy_loader_ios_unittest.mm
index 9e8317112eef062d7bb376c765a5c63fb70a9956..9f8275fad29f9fabb65d0429a942be4677d68674 100644
--- a/components/policy/core/common/policy_loader_ios_unittest.mm
+++ b/components/policy/core/common/policy_loader_ios_unittest.mm
@@ -2,18 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "components/policy/core/common/policy_loader_ios.h"
+
#include <UIKit/UIKit.h>
#include "base/callback.h"
#include "base/files/file_path.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/sys_string_conversions.h"
#include "base/test/test_simple_task_runner.h"
#include "base/values.h"
#include "components/policy/core/common/async_policy_provider.h"
#include "components/policy/core/common/configuration_policy_provider_test.h"
#include "components/policy/core/common/policy_bundle.h"
-#include "components/policy/core/common/policy_loader_ios.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/policy_test_utils.h"
#include "components/policy/core/common/policy_types.h"
@@ -86,9 +88,9 @@ void TestHarness::SetUp() {
ConfigurationPolicyProvider* TestHarness::CreateProvider(
SchemaRegistry* registry,
scoped_refptr<base::SequencedTaskRunner> task_runner) {
- scoped_ptr<AsyncPolicyLoader> loader();
+ std::unique_ptr<AsyncPolicyLoader> loader();
return new AsyncPolicyProvider(
- registry, make_scoped_ptr(new PolicyLoaderIOS(task_runner)));
+ registry, base::WrapUnique(new PolicyLoaderIOS(task_runner)));
}
void TestHarness::InstallEmptyPolicy() {
@@ -263,7 +265,7 @@ TEST(PolicyProviderIOSTest, ChromePolicyOverEncodedChromePolicy) {
scoped_refptr<base::TestSimpleTaskRunner> taskRunner =
new base::TestSimpleTaskRunner();
PolicyLoaderIOS loader(taskRunner);
- scoped_ptr<PolicyBundle> bundle = loader.Load();
+ std::unique_ptr<PolicyBundle> bundle = loader.Load();
ASSERT_TRUE(bundle);
EXPECT_TRUE(bundle->Equals(expected));
}
« no previous file with comments | « components/policy/core/common/policy_loader_ios.mm ('k') | components/policy/core/common/policy_loader_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698