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

Unified Diff: components/autofill/core/browser/autofill_manager.cc

Issue 622773002: [Autofill] Autofill fails to show suggestions for credit card split across fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed ObfuscatedCreditCardNumber() from AutofillManager. Created 6 years, 2 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: components/autofill/core/browser/autofill_manager.cc
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index d685ff79ab9614540f94558590dc01193997049f..22bf2eb6ccaf118d6a791f02b73ef86f40715727 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -473,7 +473,7 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id,
bool is_filling_credit_card = (type.group() == CREDIT_CARD);
if (is_filling_credit_card) {
GetCreditCardSuggestions(
- field, type, &values, &labels, &icons, &unique_ids);
+ field, *autofill_field, &values, &labels, &icons, &unique_ids);
} else {
GetProfileSuggestions(*form_structure,
field,
@@ -1113,8 +1113,8 @@ void AutofillManager::GetProfileSuggestions(
// Adjust phone number to display in prefix/suffix case.
if (autofill_field.Type().GetStorableType() == PHONE_HOME_NUMBER) {
for (size_t i = 0; i < values->size(); ++i) {
- (*values)[i] = AutofillField::GetPhoneNumberValue(
- autofill_field, (*values)[i], field);
+ (*values)[i] =
+ AutofillField::GetPhoneNumberValue(autofill_field, (*values)[i]);
}
}
@@ -1126,12 +1126,13 @@ void AutofillManager::GetProfileSuggestions(
void AutofillManager::GetCreditCardSuggestions(
const FormFieldData& field,
- const AutofillType& type,
+ const AutofillField& autofill_field,
Ilya Sherman 2014/10/28 21:48:40 It looks like you can revert this change, since yo
Pritam Nikam 2014/10/29 08:38:16 Done.
std::vector<base::string16>* values,
std::vector<base::string16>* labels,
std::vector<base::string16>* icons,
std::vector<int>* unique_ids) const {
std::vector<GUIDPair> guid_pairs;
+ AutofillType type = autofill_field.Type();
personal_data_->GetCreditCardSuggestions(
type, field.value, values, labels, icons, &guid_pairs);

Powered by Google App Engine
This is Rietveld 408576698