| 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 7b898cf4881f68f2c019ccd14c065c7261b18796..3a4040a8df56d273727cdbe2c3794491a063b56b 100644
|
| --- a/net/disk_cache/simple/simple_entry_impl.h
|
| +++ b/net/disk_cache/simple/simple_entry_impl.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_IMPL_H_
|
| #define NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_IMPL_H_
|
|
|
| +#include <queue>
|
| #include <string>
|
|
|
| #include "base/files/file_path.h"
|
| @@ -45,6 +46,9 @@ class SimpleEntryImpl : public Entry {
|
| const std::string& key,
|
| const CompletionCallback& callback);
|
|
|
| + std::string key() const { return key_; }
|
| + void RunNextOperationIfNeeded();
|
| +
|
| // From Entry:
|
| virtual void Doom() OVERRIDE;
|
| virtual void Close() OVERRIDE;
|
| @@ -57,6 +61,7 @@ class SimpleEntryImpl : public Entry {
|
| net::IOBuffer* buf,
|
| int buf_len,
|
| const CompletionCallback& callback) OVERRIDE;
|
| +
|
| virtual int WriteData(int index,
|
| int offset,
|
| net::IOBuffer* buf,
|
| @@ -85,6 +90,22 @@ class SimpleEntryImpl : public Entry {
|
|
|
| virtual ~SimpleEntryImpl();
|
|
|
| + void DoomInternal();
|
| +
|
| + void ReadDataInternal(int index,
|
| + int offset,
|
| + scoped_refptr<net::IOBuffer> buf,
|
| + int buf_len,
|
| + const CompletionCallback& callback);
|
| + void WriteDataInternal(int index,
|
| + int offset,
|
| + scoped_refptr<net::IOBuffer> buf,
|
| + int buf_len,
|
| + const CompletionCallback& callback,
|
| + bool truncate);
|
| +
|
| +
|
| +
|
| // Called after a SimpleSynchronousEntry has completed CreateEntry() or
|
| // OpenEntry(). Constructs the new SimpleEntryImpl (if |result| is net::OK)
|
| // and passes it back to the caller via |out_entry|. Also runs
|
| @@ -141,6 +162,10 @@ class SimpleEntryImpl : public Entry {
|
| // threads to access the |synchronous_entry_| simultaneously.
|
| bool synchronous_entry_in_use_by_worker_;
|
|
|
| + bool read_only_operation_;
|
| + std::queue<base::Closure> operations_;
|
| +
|
| +
|
| base::WeakPtr<SimpleIndex> index_;
|
| };
|
|
|
|
|