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

Unified Diff: components/policy/core/common/async_policy_provider_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/async_policy_provider_unittest.cc
diff --git a/components/policy/core/common/async_policy_provider_unittest.cc b/components/policy/core/common/async_policy_provider_unittest.cc
index 6370c54e9b19956f0e817323db7bfaf5e4a550a9..24d577b5772eda4577b06a640dd78e0aab2e4f10 100644
--- a/components/policy/core/common/async_policy_provider_unittest.cc
+++ b/components/policy/core/common/async_policy_provider_unittest.cc
@@ -6,6 +6,7 @@
#include "base/callback.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
#include "base/sequenced_task_runner.h"
@@ -31,12 +32,9 @@ void SetPolicy(PolicyBundle* bundle,
const std::string& name,
const std::string& value) {
bundle->Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))
- .Set(name,
- POLICY_LEVEL_MANDATORY,
- POLICY_SCOPE_USER,
+ .Set(name, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
POLICY_SOURCE_PLATFORM,
- new base::StringValue(value),
- NULL);
+ base::WrapUnique(new base::StringValue(value)), nullptr);
}
class MockPolicyLoader : public AsyncPolicyLoader {

Powered by Google App Engine
This is Rietveld 408576698