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

Unified Diff: extensions/browser/value_store/value_store_change.cc

Issue 2899743002: Remove raw base::DictionaryValue::Set in //extensions (Closed)
Patch Set: Addressed nit Created 3 years, 6 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: extensions/browser/value_store/value_store_change.cc
diff --git a/extensions/browser/value_store/value_store_change.cc b/extensions/browser/value_store/value_store_change.cc
index 023a2f371f477923d0687f4040b02a8c298dbddf..6f8517cf012131426d69bcab2d25b20ea12ad663 100644
--- a/extensions/browser/value_store/value_store_change.cc
+++ b/extensions/browser/value_store/value_store_change.cc
@@ -19,10 +19,12 @@ std::string ValueStoreChange::ToJson(
std::unique_ptr<base::DictionaryValue> change_value =
base::MakeUnique<base::DictionaryValue>();
if (it->old_value()) {
- change_value->Set("oldValue", it->old_value()->DeepCopy());
+ change_value->Set("oldValue",
+ base::MakeUnique<base::Value>(*it->old_value()));
}
if (it->new_value()) {
- change_value->Set("newValue", it->new_value()->DeepCopy());
+ change_value->Set("newValue",
+ base::MakeUnique<base::Value>(*it->new_value()));
}
changes_value.SetWithoutPathExpansion(it->key(), std::move(change_value));
}
« no previous file with comments | « extensions/browser/guest_view/web_view/web_view_permission_helper.cc ('k') | extensions/common/event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698