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

Unified Diff: ios/chrome/browser/autofill/autofill_agent.mm

Issue 2911033002: Remove raw base::DictionaryValue::Set (Closed)
Patch Set: Proper Windows Fix 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
« no previous file with comments | « headless/lib/browser/headless_net_log.cc ('k') | ios/chrome/browser/notification_promo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/autofill/autofill_agent.mm
diff --git a/ios/chrome/browser/autofill/autofill_agent.mm b/ios/chrome/browser/autofill/autofill_agent.mm
index 9f2e38ce68b885379cc81e1059b2ea4c521dd6d8..39435727925f35d7f6255f15a1c12068e3ba2825 100644
--- a/ios/chrome/browser/autofill/autofill_agent.mm
+++ b/ios/chrome/browser/autofill/autofill_agent.mm
@@ -810,14 +810,14 @@ void GetFormAndField(autofill::FormData* form,
formData->SetString("formName", base::UTF16ToUTF8(form.name));
// Note: Destruction of all child base::Value types is handled by the root
// formData object on its own destruction.
- base::DictionaryValue* fieldsData = new base::DictionaryValue;
+ auto fieldsData = base::MakeUnique<base::DictionaryValue>();
const std::vector<autofill::FormFieldData>& fields = form.fields;
for (const auto& fieldData : fields) {
fieldsData->SetStringWithoutPathExpansion(base::UTF16ToUTF8(fieldData.name),
fieldData.value);
}
- formData->Set("fields", fieldsData);
+ formData->Set("fields", std::move(fieldsData));
// Stringify the JSON data and send it to the UIWebView-side fillForm method.
std::string dataString;
« no previous file with comments | « headless/lib/browser/headless_net_log.cc ('k') | ios/chrome/browser/notification_promo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698