| 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 0d0ac3903336366acecc5b2b2752fe3c108ee057..3dea42ee3356957992dd16782ce6ac960f1b0695 100644
|
| --- a/components/autofill/core/browser/autofill_manager.cc
|
| +++ b/components/autofill/core/browser/autofill_manager.cc
|
| @@ -339,15 +339,20 @@ bool AutofillManager::OnFormSubmitted(const FormData& form,
|
| if (!FindCachedForm(form, &cached_submitted_form))
|
| return false;
|
|
|
| + const std::vector<AutofillProfile*>& profiles = personal_data_->GetProfiles();
|
| + const std::vector<CreditCard*>& credit_cards =
|
| + personal_data_->GetCreditCards();
|
| +
|
| submitted_form->UpdateFromCache(*cached_submitted_form);
|
| - if (submitted_form->IsAutofillable())
|
| + if (submitted_form->IsAutofillable()) {
|
| ImportFormData(*submitted_form);
|
|
|
| + AutofillMetrics::LogNumberOfProfilesAtAutofillableFormSubmission(
|
| + profiles.size());
|
| + }
|
| +
|
| // Only upload server statistics and UMA metrics if at least some local data
|
| // is available to use as a baseline.
|
| - const std::vector<AutofillProfile*>& profiles = personal_data_->GetProfiles();
|
| - const std::vector<CreditCard*>& credit_cards =
|
| - personal_data_->GetCreditCards();
|
| if (!profiles.empty() || !credit_cards.empty()) {
|
| // Copy the profile and credit card data, so that it can be accessed on a
|
| // separate thread.
|
| @@ -507,7 +512,9 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id,
|
| RemoveDuplicateSuggestions(&suggestions);
|
|
|
| // The first time we show suggestions on this page, log the number of
|
| - // suggestions shown.
|
| + // suggestions available.
|
| + // TODO(mathp): Differentiate between number of suggestions available
|
| + // (current metric) and number shown to the user.
|
| if (!has_logged_address_suggestions_count_ && !section_is_autofilled) {
|
| AutofillMetrics::LogAddressSuggestionsCount(suggestions.size());
|
| has_logged_address_suggestions_count_ = true;
|
|
|