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

Unified Diff: components/autofill/core/browser/credit_card_field.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/credit_card_field.cc
diff --git a/components/autofill/core/browser/credit_card_field.cc b/components/autofill/core/browser/credit_card_field.cc
index f53c6865f408afd490b0f93e1e385437aabe9ee6..eef86019a8ea967ec9847c37670065de14d9a98c 100644
--- a/components/autofill/core/browser/credit_card_field.cc
+++ b/components/autofill/core/browser/credit_card_field.cc
@@ -15,6 +15,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
+#include "components/autofill/core/browser/autofill_clock.h"
#include "components/autofill/core/browser/autofill_field.h"
#include "components/autofill/core/browser/autofill_regex_constants.h"
#include "components/autofill/core/browser/autofill_scanner.h"
@@ -285,7 +286,7 @@ bool CreditCardField::LikelyCardYearSelectField(AutofillScanner* scanner) {
if (!MatchesFormControlType(field->form_control_type, MATCH_SELECT))
return false;
- const base::Time time_now = base::Time::Now();
+ const base::Time time_now = AutofillClock::Now();
base::Time::Exploded time_exploded;
time_now.UTCExplode(&time_exploded);

Powered by Google App Engine
This is Rietveld 408576698