| Index: net/disk_cache/blockfile/backend_impl_v3.h
|
| diff --git a/net/disk_cache/blockfile/backend_impl_v3.h b/net/disk_cache/blockfile/backend_impl_v3.h
|
| index 37f90aaf15d4507cab0cd232f35c15d40d957e1d..4c529ae0e0eccf3617acd5a0aa892e01236514bd 100644
|
| --- a/net/disk_cache/blockfile/backend_impl_v3.h
|
| +++ b/net/disk_cache/blockfile/backend_impl_v3.h
|
| @@ -51,7 +51,8 @@ class NET_EXPORT_PRIVATE BackendImplV3 : public Backend {
|
| int Init(const CompletionCallback& callback);
|
|
|
| // Same behavior as OpenNextEntry but walks the list from back to front.
|
| - int OpenPrevEntry(void** iter, Entry** prev_entry,
|
| + int OpenPrevEntry(void** iter,
|
| + Entry** prev_entry,
|
| const CompletionCallback& callback);
|
|
|
| // Sets the maximum size for the total amount of data stored by this instance.
|
| @@ -61,8 +62,7 @@ class NET_EXPORT_PRIVATE BackendImplV3 : public Backend {
|
| void SetType(net::CacheType type);
|
|
|
| // Creates a new storage block of size block_count.
|
| - bool CreateBlock(FileType block_type, int block_count,
|
| - Addr* block_address);
|
| + bool CreateBlock(FileType block_type, int block_count, Addr* block_address);
|
|
|
| // Updates the ranking information for an entry.
|
| void UpdateRank(EntryImplV3* entry, bool modified);
|
| @@ -103,9 +103,7 @@ class NET_EXPORT_PRIVATE BackendImplV3 : public Backend {
|
| void BufferDeleted(int size);
|
|
|
| // Only intended for testing the two previous methods.
|
| - int GetTotalBuffersSize() const {
|
| - return buffer_bytes_;
|
| - }
|
| + int GetTotalBuffersSize() const { return buffer_bytes_; }
|
|
|
| // Returns true if this instance seems to be under heavy load.
|
| bool IsLoaded() const;
|
| @@ -114,13 +112,9 @@ class NET_EXPORT_PRIVATE BackendImplV3 : public Backend {
|
| // cache type. The name will be "DiskCache3.name_type".
|
| std::string HistogramName(const char* name) const;
|
|
|
| - net::CacheType cache_type() const {
|
| - return cache_type_;
|
| - }
|
| + net::CacheType cache_type() const { return cache_type_; }
|
|
|
| - bool read_only() const {
|
| - return read_only_;
|
| - }
|
| + bool read_only() const { return read_only_; }
|
|
|
| // Returns a weak pointer to this object.
|
| base::WeakPtr<BackendImplV3> GetWeakPtr();
|
| @@ -173,9 +167,11 @@ class NET_EXPORT_PRIVATE BackendImplV3 : public Backend {
|
| // Backend implementation.
|
| virtual net::CacheType GetCacheType() const OVERRIDE;
|
| virtual int32 GetEntryCount() const OVERRIDE;
|
| - virtual int OpenEntry(const std::string& key, Entry** entry,
|
| + virtual int OpenEntry(const std::string& key,
|
| + Entry** entry,
|
| const CompletionCallback& callback) OVERRIDE;
|
| - virtual int CreateEntry(const std::string& key, Entry** entry,
|
| + virtual int CreateEntry(const std::string& key,
|
| + Entry** entry,
|
| const CompletionCallback& callback) OVERRIDE;
|
| virtual int DoomEntry(const std::string& key,
|
| const CompletionCallback& callback) OVERRIDE;
|
| @@ -185,7 +181,8 @@ class NET_EXPORT_PRIVATE BackendImplV3 : public Backend {
|
| const CompletionCallback& callback) OVERRIDE;
|
| virtual int DoomEntriesSince(base::Time initial_time,
|
| const CompletionCallback& callback) OVERRIDE;
|
| - virtual int OpenNextEntry(void** iter, Entry** next_entry,
|
| + virtual int OpenNextEntry(void** iter,
|
| + Entry** next_entry,
|
| const CompletionCallback& callback) OVERRIDE;
|
| virtual void EndEnumeration(void** iter) OVERRIDE;
|
| virtual void GetStats(StatsItems* stats) OVERRIDE;
|
| @@ -212,7 +209,9 @@ class NET_EXPORT_PRIVATE BackendImplV3 : public Backend {
|
| int NewEntry(Addr address, EntryImplV3** entry);
|
|
|
| // Opens the next or previous entry on a cache iteration.
|
| - int OpenFollowingEntry(bool forward, void** iter, Entry** next_entry,
|
| + int OpenFollowingEntry(bool forward,
|
| + void** iter,
|
| + Entry** next_entry,
|
| const CompletionCallback& callback);
|
|
|
| // Handles the used storage count.
|
| @@ -249,29 +248,29 @@ class NET_EXPORT_PRIVATE BackendImplV3 : public Backend {
|
| IndexTable index_;
|
| base::FilePath path_; // Path to the folder used as backing storage.
|
| BlockBitmaps block_files_;
|
| - int32 max_size_; // Maximum data size for this instance.
|
| + int32 max_size_; // Maximum data size for this instance.
|
| EvictionV3 eviction_; // Handler of the eviction algorithm.
|
| EntriesMap open_entries_;
|
| - int num_refs_; // Number of referenced cache entries.
|
| - int max_refs_; // Max number of referenced cache entries.
|
| - int entry_count_; // Number of entries accessed lately.
|
| - int byte_count_; // Number of bytes read/written lately.
|
| + int num_refs_; // Number of referenced cache entries.
|
| + int max_refs_; // Max number of referenced cache entries.
|
| + int entry_count_; // Number of entries accessed lately.
|
| + int byte_count_; // Number of bytes read/written lately.
|
| int buffer_bytes_; // Total size of the temporary entries' buffers.
|
| - int up_ticks_; // The number of timer ticks received (OnTimerTick).
|
| + int up_ticks_; // The number of timer ticks received (OnTimerTick).
|
| net::CacheType cache_type_;
|
| - int uma_report_; // Controls transmission of UMA data.
|
| + int uma_report_; // Controls transmission of UMA data.
|
| uint32 user_flags_; // Flags set by the user.
|
| - bool init_; // controls the initialization of the system.
|
| + bool init_; // controls the initialization of the system.
|
| bool restarted_;
|
| bool read_only_; // Prevents updates of the rankings data (used by tools).
|
| bool disabled_;
|
| bool lru_eviction_; // What eviction algorithm should be used.
|
| - bool first_timer_; // True if the timer has not been called.
|
| - bool user_load_; // True if we see a high load coming from the caller.
|
| + bool first_timer_; // True if the timer has not been called.
|
| + bool user_load_; // True if we see a high load coming from the caller.
|
|
|
| net::NetLog* net_log_;
|
|
|
| - Stats stats_; // Usage statistics.
|
| + Stats stats_; // Usage statistics.
|
| scoped_ptr<base::RepeatingTimer<BackendImplV3> > timer_; // Usage timer.
|
| scoped_refptr<TraceObject> trace_object_; // Initializes internal tracing.
|
| base::WeakPtrFactory<BackendImplV3> ptr_factory_;
|
|
|