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

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

Issue 2864363004: Adds UMA for days since previous use to help us determine the validity (Closed)
Patch Set: Merge forward. 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 ba29a6364bf75419d9363854b5dfd573f117b2d0..7ea848f155769d5d5f365b2b75ee42339fa54d28 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -23,6 +23,7 @@
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
+#include "base/metrics/histogram_macros.h"
#include "base/path_service.h"
#include "base/strings/string16.h"
#include "base/strings/string_number_conversions.h"
@@ -1440,9 +1441,14 @@ int AutofillManager::GetProfilesForCreditCardUpload(
if (verified_zip.empty() && !candidate_profiles.empty())
upload_decision_metrics |= AutofillMetrics::UPLOAD_NOT_OFFERED_NO_ZIP_CODE;
- if (!upload_decision_metrics)
+ if (!upload_decision_metrics) {
profiles->assign(candidate_profiles.begin(), candidate_profiles.end());
-
+ if (!has_modified_profile)
+ for (const AutofillProfile& profile : candidate_profiles)
+ UMA_HISTOGRAM_COUNTS_1000(
+ "Autofill.DaysSincePreviousUseAtSubmission.Profile",
+ (profile.use_date() - profile.previous_use_date()).InDays());
+ }
return upload_decision_metrics;
}
« 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