| Index: chrome/browser/net/disk_cache_dir_policy_handler_unittest.cc
|
| diff --git a/chrome/browser/net/disk_cache_dir_policy_handler_unittest.cc b/chrome/browser/net/disk_cache_dir_policy_handler_unittest.cc
|
| index 71dbb250429e4d5141b598785779a252d806ed33..3104690b8d03403896d31ab2db53a13a69cea4a2 100644
|
| --- a/chrome/browser/net/disk_cache_dir_policy_handler_unittest.cc
|
| +++ b/chrome/browser/net/disk_cache_dir_policy_handler_unittest.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include <string>
|
|
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/values.h"
|
| #include "chrome/browser/net/disk_cache_dir_policy_handler.h"
|
| #include "chrome/common/pref_names.h"
|
| @@ -29,12 +30,9 @@ TEST_F(DiskCacheDirPolicyTest, Default) {
|
|
|
| TEST_F(DiskCacheDirPolicyTest, SetPolicyInvalid) {
|
| // DiskCacheDir policy expects a string; give it a boolean.
|
| - policy_.Set(key::kDiskCacheDir,
|
| - POLICY_LEVEL_MANDATORY,
|
| - POLICY_SCOPE_USER,
|
| + policy_.Set(key::kDiskCacheDir, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
|
| POLICY_SOURCE_CLOUD,
|
| - new base::FundamentalValue(false),
|
| - NULL);
|
| + base::WrapUnique(new base::FundamentalValue(false)), nullptr);
|
| handler_.ApplyPolicySettings(policy_, &prefs_);
|
| EXPECT_FALSE(prefs_.GetValue(prefs::kDiskCacheDir, NULL));
|
| }
|
| @@ -42,12 +40,9 @@ TEST_F(DiskCacheDirPolicyTest, SetPolicyInvalid) {
|
| TEST_F(DiskCacheDirPolicyTest, SetPolicyValid) {
|
| // Use a variable in the value. It should be expanded by the handler.
|
| const std::string in = "${user_name}/foo";
|
| - policy_.Set(key::kDiskCacheDir,
|
| - POLICY_LEVEL_MANDATORY,
|
| - POLICY_SCOPE_USER,
|
| - POLICY_SOURCE_CLOUD,
|
| - new base::StringValue(in),
|
| - NULL);
|
| + policy_.Set(key::kDiskCacheDir, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
|
| + POLICY_SOURCE_CLOUD, base::WrapUnique(new base::StringValue(in)),
|
| + nullptr);
|
| handler_.ApplyPolicySettings(policy_, &prefs_);
|
|
|
| const base::Value* value;
|
|
|