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

Unified Diff: net/http/http_response_headers.cc

Issue 670303003: Use DCHECK_EQ() when comparing TimeDeltas. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@s-w-r-mmenke-fixes
Patch Set: Merge latest changes. Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_response_headers.cc
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
index 180d088203cbe71717fea2a88d3a1dbc2e71445a..91673f48fecf852f5743de17d681a136cc0e65de 100644
--- a/net/http/http_response_headers.cc
+++ b/net/http/http_response_headers.cc
@@ -1021,7 +1021,7 @@ HttpResponseHeaders::GetFreshnessLifetimes(const Time& response_time) const {
bool must_revalidate = HasHeaderValue("cache-control", "must-revalidate");
if (must_revalidate || !GetStaleWhileRevalidateValue(&lifetimes.staleness)) {
- DCHECK(lifetimes.staleness == TimeDelta());
+ DCHECK_EQ(TimeDelta(), lifetimes.staleness);
}
// NOTE: "Cache-Control: max-age" overrides Expires, so we only check the
@@ -1045,7 +1045,7 @@ HttpResponseHeaders::GetFreshnessLifetimes(const Time& response_time) const {
return lifetimes;
}
- DCHECK(lifetimes.freshness == TimeDelta());
+ DCHECK_EQ(TimeDelta(), lifetimes.freshness);
return lifetimes;
}
@@ -1097,7 +1097,7 @@ HttpResponseHeaders::GetFreshnessLifetimes(const Time& response_time) const {
// Our heuristic freshness estimate for this resource is 0 seconds, in
// accordance with common browser behaviour. However, stale-while-revalidate
// may still apply.
- DCHECK(lifetimes.freshness == TimeDelta());
+ DCHECK_EQ(TimeDelta(), lifetimes.freshness);
return lifetimes;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698