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

Unified Diff: net/cert/x509_cert_types.cc

Issue 2090713003: Make callers of FromUTC(Local)Exploded in net/ use new time API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 4 years 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: net/cert/x509_cert_types.cc
diff --git a/net/cert/x509_cert_types.cc b/net/cert/x509_cert_types.cc
index e2ffb3d1b05ab829423360f7b9613e71e042a7bd..eec184a10f44393019cfda1c7131fa7d74a7d6d4 100644
--- a/net/cert/x509_cert_types.cc
+++ b/net/cert/x509_cert_types.cc
@@ -71,13 +71,9 @@ bool ParseCertificateDate(const base::StringPiece& raw_date,
if (valid && year_length == 2)
exploded.year += exploded.year < 50 ? 2000 : 1900;
- valid &= exploded.HasValidValues();
-
if (!valid)
return false;
-
- *time = base::Time::FromUTCExploded(exploded);
- return true;
+ return base::Time::FromUTCExploded(exploded, time);
}
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698