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

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

Issue 2843813002: Remove SetWithoutPathExpansion (Closed)
Patch Set: Fix CrOS Error Created 3 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
« no previous file with comments | « extensions/browser/extension_prefs.cc ('k') | ios/chrome/browser/browser_state/browser_state_info_cache.h » ('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 fa8ffb63081afcbadf263a6f9a475215029c260e..4a283809e36b0ede66e33fd2a70cbda685080a90 100644
--- a/ios/chrome/browser/autofill/autofill_agent.mm
+++ b/ios/chrome/browser/autofill/autofill_agent.mm
@@ -6,6 +6,7 @@
#include <memory>
#include <string>
+#include <utility>
#include "base/format_macros.h"
#include "base/guid.h"
@@ -13,6 +14,7 @@
#include "base/json/json_writer.h"
#include "base/mac/foundation_util.h"
#include "base/mac/scoped_block.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/field_trial.h"
#include "base/strings/string16.h"
#include "base/strings/sys_string_conversions.h"
@@ -861,7 +863,7 @@ void GetFormAndField(autofill::FormData* form,
base::DictionaryValue predictionData;
for (autofill::FormStructure* form : structure) {
// |predictionData| will take ownership below.
- base::DictionaryValue* formJSONData = new base::DictionaryValue;
+ auto formJSONData = base::MakeUnique<base::DictionaryValue>();
autofill::FormData formData = form->ToFormData();
for (const auto& field : *form) {
autofill::AutofillType type(field->Type());
@@ -871,7 +873,7 @@ void GetFormAndField(autofill::FormData* form,
base::UTF16ToUTF8(field->name), type.ToString());
}
predictionData.SetWithoutPathExpansion(base::UTF16ToUTF8(formData.name),
- formJSONData);
+ std::move(formJSONData));
}
std::string dataString;
base::JSONWriter::Write(predictionData, &dataString);
« no previous file with comments | « extensions/browser/extension_prefs.cc ('k') | ios/chrome/browser/browser_state/browser_state_info_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698