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

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: Added DCHECK 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..c457d5c3e30d8bdad3fc8fe94fa95bfd973638e8 100644
--- a/components/autofill/core/browser/credit_card_field.cc
+++ b/components/autofill/core/browser/credit_card_field.cc
@@ -19,6 +19,7 @@
#include "components/autofill/core/browser/autofill_regex_constants.h"
#include "components/autofill/core/browser/autofill_scanner.h"
#include "components/autofill/core/browser/field_types.h"
+#include "components/autofill/core/common/autofill_clock.h"
#include "components/autofill/core/common/autofill_regexes.h"
#include "grit/components_strings.h"
#include "ui/base/l10n/l10n_util.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);
« no previous file with comments | « components/autofill/core/browser/credit_card.cc ('k') | components/autofill/core/browser/payments/full_card_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698