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

Unified Diff: net/http/http_cache_transaction.h

Issue 2922973003: RFC: use some in-memory state in SimpleCache to quickly cache-miss some CantConditionalize cases
Patch Set: - Implement support for oracle bytes in MockHttpCache, so the code actually gets exercised in tests… Created 3 years, 6 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/http_cache_transaction.h
diff --git a/net/http/http_cache_transaction.h b/net/http/http_cache_transaction.h
index 51c0db70256cbd31505ca20ffba6486ab4c36aad..b2398874b56708f70e45877c01784a3b96008449 100644
--- a/net/http/http_cache_transaction.h
+++ b/net/http/http_cache_transaction.h
@@ -345,6 +345,11 @@ class HttpCache::Transaction : public HttpTransaction {
// copy is valid). Returns true if able to make the request conditional.
bool ConditionalizeRequest();
+ // Determins if saved response permits conditionalization, and extracts
+ // etag/last-modified values. Only depends on response_.headers.
+ bool ResponseConditionalizable(std::string* etag_value,
+ std::string* last_modified_value);
+
// Makes sure that a 206 response is expected. Returns true on success.
// On success, handling_206_ will be set to true if we are processing a
// partial entry.

Powered by Google App Engine
This is Rietveld 408576698