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

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

Issue 2711543002: Experiment to add bank name in autofill ui. (Closed)
Patch Set: Experiment to add bank name in autofill ui. 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 4bb5995e164aa57fbe52e797adcce246b1d4db64..09cfefc22c2a4459b717ece06ccb9d35faaa9e34 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -1998,6 +1998,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());
« no previous file with comments | « components/autofill/core/browser/autofill_experiments.cc ('k') | components/autofill/core/browser/autofill_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698