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 8933d9634fa2a7d44df20ef1c764d33200ceb9b2..864f13e081401c6f962fc53ba95525d62beb11d2 100644 |
--- a/net/disk_cache/simple/simple_entry_impl.h |
+++ b/net/disk_cache/simple/simple_entry_impl.h |
@@ -207,7 +207,7 @@ class SimpleEntryImpl : public Entry, public base::RefCounted<SimpleEntryImpl>, |
int offset, |
const CompletionCallback& completion_callback, |
scoped_ptr<uint32> read_crc32, |
- scoped_ptr<base::Time> last_used, |
+ scoped_ptr<SimpleEntryStat> entry_stat, |
scoped_ptr<int> result); |
// Called after an asynchronous write completes. |
@@ -236,6 +236,14 @@ class SimpleEntryImpl : public Entry, public base::RefCounted<SimpleEntryImpl>, |
void RecordReadIsParallelizable(const SimpleEntryOperation& operation) const; |
void RecordWriteDependencyType(const SimpleEntryOperation& operation) const; |
+ // Reads from the stream 0 data kept in memory. |
+ int ReadStream0Data(net::IOBuffer* buf, int offset, int buf_len); |
+ |
+ // Writes to the stream 0 data kept in memory. |
+ int WriteStream0Data(net::IOBuffer* buf, |
pasko
2013/09/09 20:01:22
I find this name confusing. I would prefer CopyStr
clamy
2013/09/10 14:35:59
Done.
|
+ int offset, int buf_len, |
+ bool truncate); |
+ |
// All nonstatic SimpleEntryImpl methods should always be called on the IO |
// thread, in all cases. |io_thread_checker_| documents and enforces this. |
base::ThreadChecker io_thread_checker_; |
@@ -253,7 +261,7 @@ class SimpleEntryImpl : public Entry, public base::RefCounted<SimpleEntryImpl>, |
// TODO(clamy): Unify last_used_ with data in the index. |
base::Time last_used_; |
base::Time last_modified_; |
- int32 data_size_[kSimpleEntryFileCount]; |
+ int32 data_size_[kSimpleEntryStreamCount]; |
// Number of times this object has been returned from Backend::OpenEntry() and |
// Backend::CreateEntry() without subsequent Entry::Close() calls. Used to |
@@ -266,15 +274,15 @@ class SimpleEntryImpl : public Entry, public base::RefCounted<SimpleEntryImpl>, |
// write. For each stream, |crc32s_[index]| is the crc32 of that stream from |
// [0 .. |crc32s_end_offset_|). If |crc32s_end_offset_[index] == 0| then the |
// value of |crc32s_[index]| is undefined. |
- int32 crc32s_end_offset_[kSimpleEntryFileCount]; |
- uint32 crc32s_[kSimpleEntryFileCount]; |
+ int32 crc32s_end_offset_[kSimpleEntryStreamCount]; |
+ uint32 crc32s_[kSimpleEntryStreamCount]; |
// If |have_written_[index]| is true, we have written to the stream |index|. |
- bool have_written_[kSimpleEntryFileCount]; |
+ bool have_written_[kSimpleEntryStreamCount]; |
// Reflects how much CRC checking has been done with the entry. This state is |
// reported on closing each entry stream. |
- CheckCrcResult crc_check_state_[kSimpleEntryFileCount]; |
+ CheckCrcResult crc_check_state_[kSimpleEntryStreamCount]; |
// The |synchronous_entry_| is the worker thread object that performs IO on |
// entries. It's owned by this SimpleEntryImpl whenever |operation_running_| |
@@ -286,6 +294,8 @@ class SimpleEntryImpl : public Entry, public base::RefCounted<SimpleEntryImpl>, |
net::BoundNetLog net_log_; |
scoped_ptr<SimpleEntryOperation> executing_operation_; |
+ |
+ scoped_refptr<net::IOBuffer> stream_0_data_; |
pasko
2013/09/09 20:01:22
We should have an explanation why stream 0 is spec
clamy
2013/09/10 14:35:59
Done.
|
}; |
} // namespace disk_cache |