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

Unified Diff: net/http/http_util.h

Issue 1481143002: Added HttpUtils::HasValidators and HttpResponse::HasValidators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed first batch of bengr@'s comments Created 5 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/http/http_util.h
diff --git a/net/http/http_util.h b/net/http/http_util.h
index 1bb3c93f8ab168152dc75205e00aabcc0d9c30cf..1613918e58e36e933d728bd32d7a4f1098f0d25b 100644
--- a/net/http/http_util.h
+++ b/net/http/http_util.h
@@ -203,6 +203,13 @@ class NET_EXPORT HttpUtil {
const std::string& last_modified_header,
const std::string& date_header);
+ // Returns true if this response has any validator (either a Last-Modified or
+ // an ETag) regardless if they are strong or weak. See section 13.3.3 of RFC
bengr 2016/02/21 21:08:05 Fix this comment to as per my last comment.
jamartin 2016/02/22 16:49:43 Done.
+ // 2616.
+ static bool HasValidators(HttpVersion version,
+ const std::string& etag_header,
+ const std::string& last_modified_header);
+
// Gets a vector of common HTTP status codes for histograms of status
// codes. Currently returns everything in the range [100, 600), plus 0
// (for invalid responses/status codes).

Powered by Google App Engine
This is Rietveld 408576698