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

Unified Diff: remoting/host/policy_watcher.cc

Issue 1945443002: Convert callers of base::DeepCopy() to base::CreateDeepCopy() in //remoting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 3 more 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: remoting/host/policy_watcher.cc
diff --git a/remoting/host/policy_watcher.cc b/remoting/host/policy_watcher.cc
index 96727292f7fd98b3b7efd41526da4448bd92a17b..ce590480ac797728a9ec4ebfb1f29fa105c8b42c 100644
--- a/remoting/host/policy_watcher.cc
+++ b/remoting/host/policy_watcher.cc
@@ -52,7 +52,7 @@ namespace {
std::unique_ptr<base::DictionaryValue> CopyValuesAndAddDefaults(
const base::DictionaryValue& from,
const base::DictionaryValue& default_values) {
- std::unique_ptr<base::DictionaryValue> to(default_values.DeepCopy());
+ std::unique_ptr<base::DictionaryValue> to(default_values.CreateDeepCopy());
for (base::DictionaryValue::Iterator i(default_values); !i.IsAtEnd();
i.Advance()) {
const base::Value* value = nullptr;
@@ -63,7 +63,7 @@ std::unique_ptr<base::DictionaryValue> CopyValuesAndAddDefaults(
}
CHECK(value->IsType(i.value().GetType()));
- to->Set(i.key(), value->DeepCopy());
+ to->Set(i.key(), value->CreateDeepCopy());
}
return to;
@@ -99,7 +99,7 @@ std::unique_ptr<base::DictionaryValue> CopyChromotingPoliciesIntoDictionary(
// TODO(lukasza): Removing this somewhat brittle filtering will be possible
// after having separate, Chromoting-specific schema.
if (key.find(kPolicyNameSubstring) != std::string::npos) {
- policy_dict->Set(key, value->DeepCopy());
+ policy_dict->Set(key, value->CreateDeepCopy());
}
}
@@ -243,7 +243,7 @@ void CopyDictionaryValue(const base::DictionaryValue& from,
std::string key) {
const base::Value* value;
if (from.Get(key, &value)) {
- to.Set(key, value->DeepCopy());
+ to.Set(key, value->CreateDeepCopy());
}
}
} // namespace
@@ -259,7 +259,7 @@ PolicyWatcher::StoreNewAndReturnChangedPolicies(
base::Value* old_policy;
if (!(old_policies_->Get(iter.key(), &old_policy) &&
old_policy->Equals(&iter.value()))) {
- changed_policies->Set(iter.key(), iter.value().DeepCopy());
+ changed_policies->Set(iter.key(), iter.value().CreateDeepCopy());
}
iter.Advance();
}
« no previous file with comments | « remoting/host/it2me/it2me_native_messaging_host.cc ('k') | remoting/host/setup/me2me_native_messaging_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698