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

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

Issue 2711543002: Experiment to add bank name in autofill ui. (Closed)
Patch Set: Fix and add more metrics unit tests 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..e40f6ae40b5be5e3518235bf764aa5a8d7822bc3 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -1987,11 +1987,15 @@ std::vector<Suggestion> AutofillManager::GetCreditCardSuggestions(
const AutofillType& type) const {
credit_card_form_event_logger_->OnDidPollSuggestions(field);
+ bool isBankNameAvailable = false;
// The field value is sanitized before attempting to match it to the user's
// data.
std::vector<Suggestion> suggestions =
personal_data_->GetCreditCardSuggestions(
- type, SanitizeCreditCardFieldValue(field.value));
+ type, SanitizeCreditCardFieldValue(field.value), isBankNameAvailable);
sebsg 2017/06/12 21:17:00 I'm not a fan of setting a value in functions like
Shanfeng 2017/06/12 23:34:58 Done.
+ if (isBankNameAvailable) {
+ credit_card_form_event_logger_->SetBankNameAvailable();
+ }
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