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

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

Issue 2711543002: Experiment to add bank name in autofill ui. (Closed)
Patch Set: Address comments 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
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 ed9915a7532917eef08021661276d8d9f2dd7efc..e474718e33c9dcae39d905abb17010ef2db3b947 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -1992,6 +1992,14 @@ std::vector<Suggestion> AutofillManager::GetCreditCardSuggestions(
std::vector<Suggestion> suggestions =
personal_data_->GetCreditCardSuggestions(
type, SanitizeCreditCardFieldValue(field.value));
+ const std::vector<CreditCard*> cards_to_suggest =
+ personal_data_->GetCreditCardsToSuggest();
+ for (const CreditCard* credit_card : cards_to_suggest) {
+ if (!credit_card->bank_name().empty()) {
+ credit_card_form_event_logger_->SetBankNameAvailable();
+ break;
+ }
+ }
for (size_t i = 0; i < suggestions.size(); i++) {
suggestions[i].frontend_id =
MakeFrontendID(suggestions[i].backend_id, std::string());

Powered by Google App Engine
This is Rietveld 408576698