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

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

Issue 880353002: [Autofill] Log the number of autofill profiles available at form submission (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved log statement Created 5 years, 10 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
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_metrics.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1fc34f5630fce09ce7a025d4e9b6847d6ca724ca..1affe53c71f91d8ef62ed13fd8144d2c22c6b194 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -355,6 +355,10 @@ bool AutofillManager::OnFormSubmitted(const FormData& form,
// 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();
+ if (submitted_form->IsAutofillable()) {
+ AutofillMetrics::LogNumberOfProfilesAtAutofillableFormSubmission(
+ personal_data_->GetProfiles().size());
+ }
const std::vector<CreditCard*>& credit_cards =
personal_data_->GetCreditCards();
if (!profiles.empty() || !credit_cards.empty()) {
@@ -530,7 +534,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;
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698