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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc

Issue 347183005: autofill names - dont parse when calling SetRawInfo(FULL_NAME) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android test expectation Created 6 years, 5 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: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
index f3f89906b1c2f48708e162385940fa4ea34fe8bd..053ca8f4a5a904f1ccc4d151b01d8466f22478b5 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
@@ -201,14 +201,9 @@ void FillFormGroupFromOutputs(const FieldValueMap& detail_outputs,
iter != detail_outputs.end(); ++iter) {
ServerFieldType type = iter->first;
if (!iter->second.empty()) {
- if (type == ADDRESS_HOME_COUNTRY || type == ADDRESS_BILLING_COUNTRY) {
- form_group->SetInfo(AutofillType(type),
- iter->second,
- g_browser_process->GetApplicationLocale());
- } else {
- form_group->SetRawInfo(
- AutofillType(type).GetStorableType(), iter->second);
- }
+ form_group->SetInfo(AutofillType(type),
+ iter->second,
+ g_browser_process->GetApplicationLocale());
}
}
}
@@ -230,24 +225,18 @@ void GetBillingInfoFromOutputs(const FieldValueMap& output,
if (type == CREDIT_CARD_VERIFICATION_CODE) {
if (cvc)
cvc->assign(trimmed);
- } else if (type == ADDRESS_HOME_COUNTRY ||
- type == ADDRESS_BILLING_COUNTRY) {
- if (profile) {
- profile->SetInfo(AutofillType(type),
- trimmed,
- g_browser_process->GetApplicationLocale());
- }
+ } else if (common::IsCreditCardType(type)) {
+ card->SetRawInfo(type, trimmed);
} else {
// Copy the credit card name to |profile| in addition to |card| as
// wallet::Instrument requires a recipient name for its billing address.
if (card && type == NAME_FULL)
card->SetRawInfo(CREDIT_CARD_NAME, trimmed);
- if (common::IsCreditCardType(type)) {
- if (card)
- card->SetRawInfo(type, trimmed);
- } else if (profile) {
- profile->SetRawInfo(AutofillType(type).GetStorableType(), trimmed);
+ if (profile) {
+ profile->SetInfo(AutofillType(AutofillType(type).GetStorableType()),
+ trimmed,
+ g_browser_process->GetApplicationLocale());
}
}
}
@@ -3091,7 +3080,10 @@ void AutofillDialogControllerImpl::SuggestionsUpdated() {
const std::vector<AutofillProfile*>& profiles = manager->GetProfiles();
std::vector<base::string16> labels;
- AutofillProfile::CreateDifferentiatingLabels(profiles, &labels);
+ AutofillProfile::CreateDifferentiatingLabels(
+ profiles,
+ g_browser_process->GetApplicationLocale(),
+ &labels);
DCHECK_EQ(labels.size(), profiles.size());
for (size_t i = 0; i < profiles.size(); ++i) {
const AutofillProfile& profile = *profiles[i];

Powered by Google App Engine
This is Rietveld 408576698