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

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: cleanup naming in SimpleCache impl of this some 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..e0e7be8544ce6766f79d242ba65b6dbb3309f63a 100644
--- a/net/http/http_cache_transaction.h
+++ b/net/http/http_cache_transaction.h
@@ -167,6 +167,9 @@ class HttpCache::Transaction : public HttpTransaction {
// Returns the estimate of dynamically allocated memory in bytes.
size_t EstimateMemoryUsage() const;
+ // ### comment
+ bool CanRejectBasedOnMemoryEntryData(uint8_t in_memory_info);
+
private:
static const size_t kNumValidationHeaders = 2;
// Helper struct to pair a header name with its value, for
@@ -345,6 +348,11 @@ class HttpCache::Transaction : public HttpTransaction {
// copy is valid). Returns true if able to make the request conditional.
bool ConditionalizeRequest();
+ // Determines 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