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

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

Issue 2639403002: [Autofill] Remove direct use of base::Time::Now() in Autofill (Closed)
Patch Set: Rebase Created 3 years, 11 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_profile.cc
diff --git a/components/autofill/core/browser/autofill_profile.cc b/components/autofill/core/browser/autofill_profile.cc
index 9630d5b188b98665eb1c1f1b4dc6ed8f0e22db38..a96cd90ac5c59ec57203dcc4f6132a0d9e803140 100644
--- a/components/autofill/core/browser/autofill_profile.cc
+++ b/components/autofill/core/browser/autofill_profile.cc
@@ -23,6 +23,7 @@
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/address.h"
#include "components/autofill/core/browser/address_i18n.h"
+#include "components/autofill/core/browser/autofill_clock.h"
#include "components/autofill/core/browser/autofill_country.h"
#include "components/autofill/core/browser/autofill_field.h"
#include "components/autofill/core/browser/autofill_metrics.h"
@@ -702,7 +703,7 @@ void AutofillProfile::GenerateServerProfileIdentifier() {
void AutofillProfile::RecordAndLogUse() {
UMA_HISTOGRAM_COUNTS_1000("Autofill.DaysSinceLastUse.Profile",
- (base::Time::Now() - use_date()).InDays());
+ (AutofillClock::Now() - use_date()).InDays());
RecordUse();
}

Powered by Google App Engine
This is Rietveld 408576698