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

Unified Diff: net/http/http_cache_transaction.h

Issue 2959183002: Start work on splitting off the usage piece of in-memory index. This revision is just from the prev…
Patch Set: Rebase Created 3 years, 3 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.cc ('k') | net/http/http_cache_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache_transaction.h
diff --git a/net/http/http_cache_transaction.h b/net/http/http_cache_transaction.h
index 8c709a754fecf398d928a633e970b4c92bacb806..3c10174b29e86e956e2385ef22a22b71168b6bb5 100644
--- a/net/http/http_cache_transaction.h
+++ b/net/http/http_cache_transaction.h
@@ -191,6 +191,12 @@ class NET_EXPORT_PRIVATE HttpCache::Transaction : public HttpTransaction {
RequestPriority priority() const { return priority_; }
PartialData* partial() { return partial_.get(); }
+ // Returns true if the resource info MemoryEntryDataHints bit flags in
+ // |in_memory_info| and the current request & load flags suggest that
+ // the cache entry in question is not actually usable for HTTP
+ // (i.e. already expired, and nothing is forcing us to disregard that).
+ bool MaybeRejectBasedOnEntryInMemoryData(uint8_t in_memory_info);
+
private:
static const size_t kNumValidationHeaders = 2;
// Helper struct to pair a header name with its value, for
@@ -386,6 +392,11 @@ class NET_EXPORT_PRIVATE 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.
« no previous file with comments | « net/http/http_cache.cc ('k') | net/http/http_cache_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698