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

Unified Diff: net/disk_cache/simple/simple_synchronous_entry.h

Issue 2872943002: [SimpleCache] Prefetch stream 1 so that the first read is faster
Patch Set: Created 3 years, 7 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_synchronous_entry.h
diff --git a/net/disk_cache/simple/simple_synchronous_entry.h b/net/disk_cache/simple/simple_synchronous_entry.h
index a7e6e66b12091847ed31623ecdebf1b41d008acc..b2dd40a386ad7eaa3b05725c17a906244913d633 100644
--- a/net/disk_cache/simple/simple_synchronous_entry.h
+++ b/net/disk_cache/simple/simple_synchronous_entry.h
@@ -79,6 +79,7 @@ struct SimpleEntryCreationResults {
SimpleSynchronousEntry* sync_entry;
scoped_refptr<net::GrowableIOBuffer> stream_0_data;
+ scoped_refptr<net::GrowableIOBuffer> stream_1_prefetch_data;
SimpleEntryStat entry_stat;
uint32_t stream_0_crc32;
int result;
@@ -280,9 +281,11 @@ class SimpleSynchronousEntry {
bool CheckHeaderAndKey(int file_index);
// Returns a net error, i.e. net::OK on success.
- int InitializeForOpen(SimpleEntryStat* out_entry_stat,
- scoped_refptr<net::GrowableIOBuffer>* stream_0_data,
- uint32_t* out_stream_0_crc32);
+ int InitializeForOpen(
+ SimpleEntryStat* out_entry_stat,
+ scoped_refptr<net::GrowableIOBuffer>* stream_0_data,
+ uint32_t* out_stream_0_crc32,
+ scoped_refptr<net::GrowableIOBuffer>* stream_1_prefetch_data);
// Writes the header and key to a newly-created stream file. |index| is the
// index of the stream. Returns true on success; returns false and sets

Powered by Google App Engine
This is Rietveld 408576698