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

Unified Diff: net/http/http_response_headers.h

Issue 391763002: Initial implementation of Chrome-Freshness header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove const from directive_size. Created 6 years, 5 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 | « net/http/http_cache_unittest.cc ('k') | net/http/http_response_headers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_response_headers.h
diff --git a/net/http/http_response_headers.h b/net/http/http_response_headers.h
index 2d306c95ca048aaa4dad94528c2f87a819c11d5d..ddab798c0a2c0795556d1b2da0a583574c581553 100644
--- a/net/http/http_response_headers.h
+++ b/net/http/http_response_headers.h
@@ -229,6 +229,7 @@ class NET_EXPORT HttpResponseHeaders
bool GetDateValue(base::Time* value) const;
bool GetLastModifiedValue(base::Time* value) const;
bool GetExpiresValue(base::Time* value) const;
+ bool GetStaleWhileRevalidateValue(base::TimeDelta* value) const;
// Extracts the time value of a particular header. This method looks for the
// first matching header value and parses its value as a HTTP-date.
@@ -320,6 +321,12 @@ class NET_EXPORT HttpResponseHeaders
// index |from|. Returns string::npos if not found.
size_t FindHeader(size_t from, const base::StringPiece& name) const;
+ // Search the Cache-Control header for a directive matching |directive|. If
+ // present, treat its value as a time offset in seconds, write it to |result|,
+ // and return true.
+ bool GetCacheControlDirective(const base::StringPiece& directive,
+ base::TimeDelta* result) const;
+
// Add a header->value pair to our list. If we already have header in our
// list, append the value to it.
void AddHeader(std::string::const_iterator name_begin,
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/http/http_response_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698