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

Unified Diff: chrome/browser/extensions/api/autofill_private/autofill_util.cc

Issue 1143253012: More work on removing variants from Autofill (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: work around iOS lameness Created 5 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 | « no previous file | chrome/browser/sync/profile_sync_service_autofill_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/autofill_private/autofill_util.cc
diff --git a/chrome/browser/extensions/api/autofill_private/autofill_util.cc b/chrome/browser/extensions/api/autofill_private/autofill_util.cc
index 391ca1f4efe1c73d9ef42a4834837993ade69bc6..6492a3a811479607731323a9c73f8543a99cc4ef 100644
--- a/chrome/browser/extensions/api/autofill_private/autofill_util.cc
+++ b/chrome/browser/extensions/api/autofill_private/autofill_util.cc
@@ -24,18 +24,19 @@ namespace autofill_private = extensions::api::autofill_private;
namespace {
// Get the multi-valued element for |type| and return it as a |vector|.
+// TODO(khorimoto): remove this function since multi-valued types are
+// deprecated.
scoped_ptr<std::vector<std::string>> GetValueList(
const autofill::AutofillProfile& profile, autofill::ServerFieldType type) {
scoped_ptr<std::vector<std::string>> list(new std::vector<std::string>);
std::vector<base::string16> values;
if (autofill::AutofillType(type).group() == autofill::NAME) {
- profile.GetMultiInfo(
- autofill::AutofillType(type),
- g_browser_process->GetApplicationLocale(),
- &values);
+ values.push_back(
+ profile.GetInfo(autofill::AutofillType(type),
+ g_browser_process->GetApplicationLocale()));
} else {
- profile.GetRawMultiInfo(type, &values);
+ values.push_back(profile.GetRawInfo(type));
}
// |Get[Raw]MultiInfo()| always returns at least one, potentially empty, item.
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service_autofill_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698