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

Unified Diff: net/http/http_cache.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/base/net_error_list.h ('k') | net/http/http_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache.h
diff --git a/net/http/http_cache.h b/net/http/http_cache.h
index f0f2a0f417a340336153549bb0f09c721e3e622d..0285e9f0c153cf2aa37ee5302728453953fd7ceb 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"
@@ -43,7 +44,6 @@ class ProcessMemoryDump;
} // namespace base
namespace disk_cache {
-class Backend;
class Entry;
} // namespace disk_cache
@@ -67,6 +67,12 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory {
DISABLE
};
+ enum MemoryEntryDataHints {
+ HINT_ZERO_LIFETIME = 1,
+ HINT_RESPONSE_CANT_CONDITIONALIZE = 2,
+ HINT_UNUSED_SINCE_PREFETCH = 4
+ };
+
// A BackendFactory creates a backend object to be used by the HttpCache.
class NET_EXPORT BackendFactory {
public:
@@ -378,7 +384,10 @@ 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.
+ // returns ERR_IO_PENDING. If there is no transaction already available,
+ // it will first check with |trans->MaybeRejectBasedOnEntryInMemoryData|,
+ // returning ERR_CACHE_ENTRY_NOT_SUITABLE after dooming the key if that
+ // rejects the entry.
int OpenEntry(const std::string& key, ActiveEntry** entry,
Transaction* trans);
« no previous file with comments | « net/base/net_error_list.h ('k') | net/http/http_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698