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

Unified Diff: net/http/transport_security_state.cc

Issue 1641413002: Makes GetBuildTime behave identically on all build types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to #96 Created 4 years, 10 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: net/http/transport_security_state.cc
diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc
index 8eb29434f8631bdf60c4a99aa2bc91d29fed0429..4475b0df04dcc2110d572a319b0be90a05a4a578 100644
--- a/net/http/transport_security_state.cc
+++ b/net/http/transport_security_state.cc
@@ -1009,18 +1009,9 @@ void TransportSecurityState::ReportUMAOnPinFailure(const std::string& host) {
// static
bool TransportSecurityState::IsBuildTimely() {
- // If the build metadata aren't embedded in the binary then we can't use the
- // build time to determine if the build is timely, return true by default. If
- // we're building an official build then keep using the build time, even if
- // it's invalid it'd be a date in the past and this function will return
- // false.
-#if defined(DONT_EMBED_BUILD_METADATA) && !defined(OFFICIAL_BUILD)
- return true;
-#else
const base::Time build_time = base::GetBuildTime();
// We consider built-in information to be timely for 10 weeks.
return (base::Time::Now() - build_time).InDays() < 70 /* 10 weeks */;
-#endif
}
bool TransportSecurityState::CheckPublicKeyPinsImpl(

Powered by Google App Engine
This is Rietveld 408576698