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

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

Issue 1940153002: Use std::unique_ptr to express ownership of base::Value in PolicyMap::Entry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another-fix Created 4 years, 7 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_mac_unittest.cc
diff --git a/components/policy/core/common/policy_loader_mac_unittest.cc b/components/policy/core/common/policy_loader_mac_unittest.cc
index 3ce851ddeb1241c590d7ed8712462b1185e2aa63..0684a6abc579fab54609697b05147988e90f5e8f 100644
--- a/components/policy/core/common/policy_loader_mac_unittest.cc
+++ b/components/policy/core/common/policy_loader_mac_unittest.cc
@@ -12,6 +12,7 @@
#include "base/files/file_path.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/sys_string_conversions.h"
#include "base/values.h"
#include "components/policy/core/common/async_policy_provider.h"
@@ -193,12 +194,9 @@ TEST_F(PolicyLoaderMacTest, TestNonForcedValue) {
loop_.RunUntilIdle();
PolicyBundle expected_bundle;
expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))
- .Set(test_keys::kKeyString,
- POLICY_LEVEL_RECOMMENDED,
- POLICY_SCOPE_USER,
+ .Set(test_keys::kKeyString, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER,
POLICY_SOURCE_PLATFORM,
- new base::StringValue("string value"),
- NULL);
+ base::WrapUnique(new base::StringValue("string value")), nullptr);
EXPECT_TRUE(provider_->policies().Equals(expected_bundle));
}
« no previous file with comments | « components/policy/core/common/policy_loader_mac.mm ('k') | components/policy/core/common/policy_loader_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698