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

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

Issue 2866993002: Logs boolean UMA to track if user modified profile before credit card (Closed)
Patch Set: Logs boolean UMA to track if user modified profile before credit card form submission. Created 3 years, 7 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_manager_unittest.cc » ('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 6a0becb83062ba76039aa7eca7d096a5c9a3a75f..ba29a6364bf75419d9363854b5dfd573f117b2d0 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -1321,15 +1321,22 @@ int AutofillManager::GetProfilesForCreditCardUpload(
const base::TimeDelta fifteen_minutes = base::TimeDelta::FromMinutes(15);
int upload_decision_metrics = 0;
bool has_profile = false;
+ bool has_modified_profile = false;
- // First, collect all of the addresses used recently.
+ // First, collect all of the addresses used or modified recently.
for (AutofillProfile* profile : personal_data_->GetProfiles()) {
has_profile = true;
- if ((now - profile->use_date()) < fifteen_minutes ||
- (now - profile->modification_date()) < fifteen_minutes) {
+ if ((now - profile->modification_date()) < fifteen_minutes) {
+ has_modified_profile = true;
+ candidate_profiles.push_back(*profile);
+ } else if ((now - profile->use_date()) < fifteen_minutes) {
candidate_profiles.push_back(*profile);
}
}
+
+ AutofillMetrics::LogHasModifiedProfileOnCreditCardFormSubmission(
+ has_modified_profile);
+
if (candidate_profiles.empty()) {
upload_decision_metrics |=
has_profile
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698