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

Unified Diff: net/http/http_cache.h

Issue 2922973003: RFC: use some in-memory state in SimpleCache to quickly cache-miss some CantConditionalize cases
Patch Set: Rebase 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.h
diff --git a/net/http/http_cache.h b/net/http/http_cache.h
index 91214c179f9fb27051873c40a331821b3198386e..980245f630d8d1f19a4d2c4d3ee65500792efba7 100644
--- a/net/http/http_cache.h
+++ b/net/http/http_cache.h
@@ -31,6 +31,7 @@
#include "net/base/load_states.h"
#include "net/base/net_export.h"
#include "net/base/request_priority.h"
+#include "net/disk_cache/disk_cache.h"
#include "net/http/http_network_session.h"
#include "net/http/http_transaction_factory.h"
@@ -44,7 +45,6 @@ class ProcessMemoryDump;
} // namespace base
namespace disk_cache {
-class Backend;
class Entry;
} // namespace disk_cache
@@ -68,6 +68,13 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory {
DISABLE
};
+ // ### probably don't need to blow all of 3 bits on this.
+ enum OracleByteHints {
+ OBH_ZERO_LIFETIME = 1,
+ OBH_RESPONSE_CANT_CONDITIONALIZE = 2,
+ OBH_UNUSED_SINCE_PREFETCH = 4
+ };
+
// A BackendFactory creates a backend object to be used by the HttpCache.
class NET_EXPORT BackendFactory {
public:
@@ -371,7 +378,8 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory {
// Opens the disk cache entry associated with |key|, returning an ActiveEntry
// in |*entry|. |trans| will be notified via its IO callback if this method
// returns ERR_IO_PENDING.
- int OpenEntry(const std::string& key, ActiveEntry** entry,
+ int OpenEntry(const std::string& key,
+ ActiveEntry** entry,
Transaction* trans);
// Creates the disk cache entry associated with |key|, returning an

Powered by Google App Engine
This is Rietveld 408576698