| Index: net/disk_cache/memory/mem_entry_impl.h
|
| diff --git a/net/disk_cache/memory/mem_entry_impl.h b/net/disk_cache/memory/mem_entry_impl.h
|
| index aec8d2237b55fa1db834ea42f5892362c314eb46..2e49687aa34f8697dc003044cdac556eadb2e48c 100644
|
| --- a/net/disk_cache/memory/mem_entry_impl.h
|
| +++ b/net/disk_cache/memory/mem_entry_impl.h
|
| @@ -62,29 +62,17 @@ class MemEntryImpl : public Entry {
|
| void Open();
|
| bool InUse();
|
|
|
| - MemEntryImpl* next() const {
|
| - return next_;
|
| - }
|
| + MemEntryImpl* next() const { return next_; }
|
|
|
| - MemEntryImpl* prev() const {
|
| - return prev_;
|
| - }
|
| + MemEntryImpl* prev() const { return prev_; }
|
|
|
| - void set_next(MemEntryImpl* next) {
|
| - next_ = next;
|
| - }
|
| + void set_next(MemEntryImpl* next) { next_ = next; }
|
|
|
| - void set_prev(MemEntryImpl* prev) {
|
| - prev_ = prev;
|
| - }
|
| + void set_prev(MemEntryImpl* prev) { prev_ = prev; }
|
|
|
| - EntryType type() const {
|
| - return parent_ ? kChildEntry : kParentEntry;
|
| - }
|
| + EntryType type() const { return parent_ ? kChildEntry : kParentEntry; }
|
|
|
| - const net::BoundNetLog& net_log() {
|
| - return net_log_;
|
| - }
|
| + const net::BoundNetLog& net_log() { return net_log_; }
|
|
|
| // Entry interface.
|
| virtual void Doom() OVERRIDE;
|
| @@ -93,16 +81,28 @@ class MemEntryImpl : public Entry {
|
| virtual base::Time GetLastUsed() const OVERRIDE;
|
| virtual base::Time GetLastModified() const OVERRIDE;
|
| virtual int32 GetDataSize(int index) const OVERRIDE;
|
| - virtual int ReadData(int index, int offset, IOBuffer* buf, int buf_len,
|
| + virtual int ReadData(int index,
|
| + int offset,
|
| + IOBuffer* buf,
|
| + int buf_len,
|
| const CompletionCallback& callback) OVERRIDE;
|
| - virtual int WriteData(int index, int offset, IOBuffer* buf, int buf_len,
|
| + virtual int WriteData(int index,
|
| + int offset,
|
| + IOBuffer* buf,
|
| + int buf_len,
|
| const CompletionCallback& callback,
|
| bool truncate) OVERRIDE;
|
| - virtual int ReadSparseData(int64 offset, IOBuffer* buf, int buf_len,
|
| + virtual int ReadSparseData(int64 offset,
|
| + IOBuffer* buf,
|
| + int buf_len,
|
| const CompletionCallback& callback) OVERRIDE;
|
| - virtual int WriteSparseData(int64 offset, IOBuffer* buf, int buf_len,
|
| + virtual int WriteSparseData(int64 offset,
|
| + IOBuffer* buf,
|
| + int buf_len,
|
| const CompletionCallback& callback) OVERRIDE;
|
| - virtual int GetAvailableRange(int64 offset, int len, int64* start,
|
| + virtual int GetAvailableRange(int64 offset,
|
| + int len,
|
| + int64* start,
|
| const CompletionCallback& callback) OVERRIDE;
|
| virtual bool CouldBeSparse() const OVERRIDE;
|
| virtual void CancelSparseIO() OVERRIDE {}
|
| @@ -111,16 +111,17 @@ class MemEntryImpl : public Entry {
|
| private:
|
| typedef base::hash_map<int, MemEntryImpl*> EntryMap;
|
|
|
| - enum {
|
| - NUM_STREAMS = 3
|
| - };
|
| + enum { NUM_STREAMS = 3 };
|
|
|
| virtual ~MemEntryImpl();
|
|
|
| // Do all the work for corresponding public functions. Implemented as
|
| // separate functions to make logging of results simpler.
|
| int InternalReadData(int index, int offset, IOBuffer* buf, int buf_len);
|
| - int InternalWriteData(int index, int offset, IOBuffer* buf, int buf_len,
|
| + int InternalWriteData(int index,
|
| + int offset,
|
| + IOBuffer* buf,
|
| + int buf_len,
|
| bool truncate);
|
| int InternalReadSparseData(int64 offset, IOBuffer* buf, int buf_len);
|
| int InternalWriteSparseData(int64 offset, IOBuffer* buf, int buf_len);
|
| @@ -162,18 +163,18 @@ class MemEntryImpl : public Entry {
|
| int32 data_size_[NUM_STREAMS];
|
| int ref_count_;
|
|
|
| - int child_id_; // The ID of a child entry.
|
| - int child_first_pos_; // The position of the first byte in a child
|
| - // entry.
|
| - MemEntryImpl* next_; // Pointers for the LRU list.
|
| + int child_id_; // The ID of a child entry.
|
| + int child_first_pos_; // The position of the first byte in a child
|
| + // entry.
|
| + MemEntryImpl* next_; // Pointers for the LRU list.
|
| MemEntryImpl* prev_;
|
| - MemEntryImpl* parent_; // Pointer to the parent entry.
|
| + MemEntryImpl* parent_; // Pointer to the parent entry.
|
| scoped_ptr<EntryMap> children_;
|
|
|
| base::Time last_modified_; // LRU information.
|
| base::Time last_used_;
|
| - MemBackendImpl* backend_; // Back pointer to the cache.
|
| - bool doomed_; // True if this entry was removed from the cache.
|
| + MemBackendImpl* backend_; // Back pointer to the cache.
|
| + bool doomed_; // True if this entry was removed from the cache.
|
|
|
| net::BoundNetLog net_log_;
|
|
|
|
|