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

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

Issue 1874493002: [Autofill] Add user actions for checkout flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 8 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 108899307a89da297da7e4975a206f77be48cf42..8ada5130ff8e3d6fbf01d7e3ce264246910716fe 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -712,10 +712,11 @@ void AutofillManager::DidShowSuggestions(bool is_new_popup,
AutofillMetrics::SUGGESTIONS_SHOWN_ONCE);
}
- if (autofill_field->Type().group() == CREDIT_CARD)
+ if (autofill_field->Type().group() == CREDIT_CARD) {
credit_card_form_event_logger_->OnDidShowSuggestions();
- else
+ } else {
address_form_event_logger_->OnDidShowSuggestions();
+ }
}
}
@@ -1646,6 +1647,8 @@ std::vector<Suggestion> AutofillManager::GetProfileSuggestions(
const FormStructure& form,
const FormFieldData& field,
const AutofillField& autofill_field) const {
+ address_form_event_logger_->OnDidPollSuggestions();
+
std::vector<ServerFieldType> field_types(form.field_count());
for (size_t i = 0; i < form.field_count(); ++i) {
field_types.push_back(form.field(i)->Type().GetStorableType());
@@ -1672,6 +1675,8 @@ std::vector<Suggestion> AutofillManager::GetProfileSuggestions(
std::vector<Suggestion> AutofillManager::GetCreditCardSuggestions(
const FormFieldData& field,
const AutofillType& type) const {
+ credit_card_form_event_logger_->OnDidPollSuggestions();
+
// The field value is sanitized before attempting to match it to the user's
// data.
std::vector<Suggestion> suggestions =

Powered by Google App Engine
This is Rietveld 408576698