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

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

Issue 2884933002: Remove raw base::DictionaryValue::SetWithoutPathExpansion (Closed)
Patch Set: Include Created 3 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
« no previous file with comments | « chromeos/network/onc/onc_translator_shill_to_onc.cc ('k') | components/policy/core/common/registry_dict.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/policy_test_utils.cc
diff --git a/components/policy/core/common/policy_test_utils.cc b/components/policy/core/common/policy_test_utils.cc
index fcf89f92de80c7582215cf69adf5d787707bf6a0..8b1a8aaffe4bdbd6843a052f4ce83d4ceed83f51 100644
--- a/components/policy/core/common/policy_test_utils.cc
+++ b/components/policy/core/common/policy_test_utils.cc
@@ -11,6 +11,7 @@
#include "base/callback.h"
#include "base/json/json_writer.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/sys_string_conversions.h"
#include "base/values.h"
#include "build/build_config.h"
@@ -48,7 +49,8 @@ bool PolicyServiceIsEmpty(const PolicyService* service) {
if (!map.empty()) {
base::DictionaryValue dict;
for (PolicyMap::const_iterator it = map.begin(); it != map.end(); ++it)
- dict.SetWithoutPathExpansion(it->first, it->second.value->DeepCopy());
+ dict.SetWithoutPathExpansion(
+ it->first, base::MakeUnique<base::Value>(*it->second.value));
LOG(WARNING) << "There are pre-existing policies in this machine: " << dict;
}
return map.empty();
« no previous file with comments | « chromeos/network/onc/onc_translator_shill_to_onc.cc ('k') | components/policy/core/common/registry_dict.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698