| Index: net/disk_cache/v3/entry_impl_v3.h
|
| ===================================================================
|
| --- net/disk_cache/v3/entry_impl_v3.h (revision 0)
|
| +++ net/disk_cache/v3/entry_impl_v3.h (working copy)
|
| @@ -51,46 +51,18 @@
|
| void CancelSparseIOImpl();
|
| int ReadyForSparseIOImpl(const CompletionCallback& callback);
|
|
|
| - inline CacheEntryBlock* entry() {
|
| - return &entry_;
|
| - }
|
| -
|
| - inline CacheRankingsBlock* rankings() {
|
| - return &node_;
|
| - }
|
| -
|
| - uint32 GetHash();
|
| -
|
| // Performs the initialization of a EntryImpl that will be added to the
|
| // cache.
|
| bool CreateEntry(Addr node_address, const std::string& key, uint32 hash);
|
|
|
| + uint32 GetHash();
|
| +
|
| // Returns true if this entry matches the lookup arguments.
|
| bool IsSameEntry(const std::string& key, uint32 hash);
|
|
|
| // Permamently destroys this entry.
|
| void InternalDoom();
|
|
|
| - // Deletes this entry from disk. If |everything| is false, only the user data
|
| - // will be removed, leaving the key and control data intact.
|
| - void DeleteEntryData(bool everything);
|
| -
|
| - // Returns the address of the next entry on the list of entries with the same
|
| - // hash.
|
| - CacheAddr GetNextAddress();
|
| -
|
| - // Sets the address of the next entry on the list of entries with the same
|
| - // hash.
|
| - void SetNextAddress(Addr address);
|
| -
|
| - // Reloads the rankings node information.
|
| - bool LoadNodeAddress();
|
| -
|
| - // Updates the stored data to reflect the run-time information for this entry.
|
| - // Returns false if the data could not be updated. The purpose of this method
|
| - // is to be able to detect entries that are currently in use.
|
| - bool Update();
|
| -
|
| bool dirty() {
|
| return dirty_;
|
| }
|
| @@ -99,17 +71,6 @@
|
| return doomed_;
|
| }
|
|
|
| - // Marks this entry as dirty (in memory) if needed. This is intended only for
|
| - // entries that are being read from disk, to be called during loading.
|
| - void SetDirtyFlag(int32 current_id);
|
| -
|
| - // Fixes this entry so it can be treated as valid (to delete it).
|
| - void SetPointerForInvalidEntry(int32 new_id);
|
| -
|
| - // Returns true if this entry is so meesed up that not everything is going to
|
| - // be removed.
|
| - bool LeaveRankingsBehind();
|
| -
|
| // Returns false if the entry is clearly invalid.
|
| bool SanityCheck();
|
| bool DataSanityCheck();
|
| @@ -117,21 +78,10 @@
|
| // Attempts to make this entry reachable though the key.
|
| void FixForDelete();
|
|
|
| - // Handle the pending asynchronous IO count.
|
| - void IncrementIoCount();
|
| - void DecrementIoCount();
|
| -
|
| - // This entry is being returned to the user. It is always called from the
|
| - // primary thread (not the dedicated cache thread).
|
| - void OnEntryCreated(BackendImpl* backend);
|
| -
|
| // Set the access times for this entry. This method provides support for
|
| // the upgrade tool.
|
| void SetTimes(base::Time last_used, base::Time last_modified);
|
|
|
| - // Generates a histogram for the time spent working on this operation.
|
| - void ReportIOTime(Operation op, const base::TimeTicks& start);
|
| -
|
| // Logs a begin event and enables logging for the EntryImpl. Will also cause
|
| // an end event to be logged on destruction. The EntryImpl must have its key
|
| // initialized before this is called. |created| is true if the Entry was
|
| @@ -140,9 +90,6 @@
|
|
|
| const net::BoundNetLog& net_log() const;
|
|
|
| - // Returns the number of blocks needed to store an EntryStore.
|
| - static int NumBlocksForEntry(int key_size);
|
| -
|
| // Entry interface.
|
| virtual void Doom() OVERRIDE;
|
| virtual void Close() OVERRIDE;
|
| @@ -195,12 +142,10 @@
|
| // Updates ranking information.
|
| void UpdateRank(bool modified);
|
|
|
| - // Returns a pointer to the file that stores the given address.
|
| - File* GetBackingFile(Addr address, int index);
|
| + // Deletes this entry from disk. If |everything| is false, only the user data
|
| + // will be removed, leaving the key and control data intact.
|
| + void DeleteEntryData(bool everything);
|
|
|
| - // Returns a pointer to the file that stores external data.
|
| - File* GetExternalFile(Addr address, int index);
|
| -
|
| // Prepares the target file or buffer for a write of buf_len bytes at the
|
| // given offset.
|
| bool PrepareTarget(int index, int offset, int buf_len, bool truncate);
|
| @@ -248,6 +193,9 @@
|
| // actual cleanup.
|
| void GetData(int index, char** buffer, Addr* address);
|
|
|
| + // Generates a histogram for the time spent working on this operation.
|
| + void ReportIOTime(Operation op, const base::TimeTicks& start);
|
| +
|
| // Logs this entry to the internal trace buffer.
|
| void Log(const char* msg);
|
|
|
|
|