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

Unified Diff: net/disk_cache/simple/simple_entry_impl.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/disk_cache/simple/simple_entry_impl.h
diff --git a/net/disk_cache/simple/simple_entry_impl.h b/net/disk_cache/simple/simple_entry_impl.h
index 7ab6c38e4ef1bd55d1ba8a60a258dbfee94afca0..e92a85f3d352f2fb28e028d5b10ba58b56110daa 100644
--- a/net/disk_cache/simple/simple_entry_impl.h
+++ b/net/disk_cache/simple/simple_entry_impl.h
@@ -83,8 +83,10 @@ class NET_EXPORT_PRIVATE SimpleEntryImpl : public Entry,
std::unique_ptr<ActiveEntryProxy> active_entry_proxy);
// Adds another reader/writer to this entry, if possible, returning |this| to
- // |entry|.
- int OpenEntry(Entry** entry, const CompletionCallback& callback);
+ // |entry|. |oracle| is permitted to be a null callback.
+ int OpenEntry(Entry** entry,
+ const Backend::OracleCallback& oracle,
+ const CompletionCallback& callback);
// Creates this entry, if possible. Returns |this| to |entry|.
int CreateEntry(Entry** entry, const CompletionCallback& callback);
@@ -108,6 +110,7 @@ class NET_EXPORT_PRIVATE SimpleEntryImpl : public Entry,
base::Time GetLastUsed() const override;
base::Time GetLastModified() const override;
int32_t GetDataSize(int index) const override;
+ void SetOracleByte(uint8_t) override;
int ReadData(int stream_index,
int offset,
net::IOBuffer* buf,

Powered by Google App Engine
This is Rietveld 408576698