| Index: net/disk_cache/mem_entry_impl.h
|
| ===================================================================
|
| --- net/disk_cache/mem_entry_impl.h (revision 78400)
|
| +++ net/disk_cache/mem_entry_impl.h (working copy)
|
| @@ -8,6 +8,7 @@
|
|
|
| #include "base/hash_tables.h"
|
| #include "base/scoped_ptr.h"
|
| +#include "net/base/net_log.h"
|
| #include "net/disk_cache/disk_cache.h"
|
| #include "testing/gtest/include/gtest/gtest_prod.h"
|
|
|
| @@ -54,7 +55,7 @@
|
|
|
| // Performs the initialization of a EntryImpl that will be added to the
|
| // cache.
|
| - bool CreateEntry(const std::string& key);
|
| + bool CreateEntry(const std::string& key, net::NetLog* net_log);
|
|
|
| // Permanently destroys this entry.
|
| void InternalDoom();
|
| @@ -82,6 +83,14 @@
|
| return parent_ ? kChildEntry : kParentEntry;
|
| }
|
|
|
| + std::string& key() {
|
| + return key_;
|
| + }
|
| +
|
| + net::BoundNetLog& net_log() {
|
| + return net_log_;
|
| + }
|
| +
|
| // Entry interface.
|
| virtual void Doom();
|
| virtual void Close();
|
| @@ -113,6 +122,14 @@
|
|
|
| ~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, net::IOBuffer* buf, int buf_len);
|
| + int InternalWriteData(int index, int offset, net::IOBuffer* buf, int buf_len,
|
| + bool truncate);
|
| + int InternalReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len);
|
| + int InternalWriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len);
|
| +
|
| // Old Entry interface.
|
| int GetAvailableRange(int64 offset, int len, int64* start);
|
|
|
| @@ -129,7 +146,7 @@
|
| // Performs the initialization of a MemEntryImpl as a child entry.
|
| // |parent| is the pointer to the parent entry. |child_id| is the ID of
|
| // the new child.
|
| - bool InitChildEntry(MemEntryImpl* parent, int child_id);
|
| + bool InitChildEntry(MemEntryImpl* parent, int child_id, net::NetLog* net_log);
|
|
|
| // Returns an entry responsible for |offset|. The returned entry can be a
|
| // child entry or this entry itself if |offset| points to the first range.
|
| @@ -163,6 +180,8 @@
|
| MemBackendImpl* backend_; // Back pointer to the cache.
|
| bool doomed_; // True if this entry was removed from the cache.
|
|
|
| + net::BoundNetLog net_log_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(MemEntryImpl);
|
| };
|
|
|
|
|