Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: net/disk_cache/simple/simple_backend_impl.h

Issue 1401923006: Reland of Implement cache counting for the simple and memory backends - with fixed test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment about APP_CACHE. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/disk_cache/memory/mem_backend_impl.cc ('k') | net/disk_cache/simple/simple_backend_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 void InitializeIndex(const CompletionCallback& callback, 133 void InitializeIndex(const CompletionCallback& callback,
134 const DiskStatResult& result); 134 const DiskStatResult& result);
135 135
136 // Dooms all entries previously accessed between |initial_time| and 136 // Dooms all entries previously accessed between |initial_time| and
137 // |end_time|. Invoked when the index is ready. 137 // |end_time|. Invoked when the index is ready.
138 void IndexReadyForDoom(base::Time initial_time, 138 void IndexReadyForDoom(base::Time initial_time,
139 base::Time end_time, 139 base::Time end_time,
140 const CompletionCallback& callback, 140 const CompletionCallback& callback,
141 int result); 141 int result);
142 142
143 // Calculates the size of the entire cache. Invoked when the index is ready.
144 void IndexReadyForSizeCalculation(const CompletionCallback& callback,
145 int result);
146
143 // Try to create the directory if it doesn't exist. This must run on the IO 147 // Try to create the directory if it doesn't exist. This must run on the IO
144 // thread. 148 // thread.
145 static DiskStatResult InitCacheStructureOnDisk(const base::FilePath& path, 149 static DiskStatResult InitCacheStructureOnDisk(const base::FilePath& path,
146 uint64 suggested_max_size); 150 uint64 suggested_max_size);
147 151
148 // Searches |active_entries_| for the entry corresponding to |key|. If found, 152 // Searches |active_entries_| for the entry corresponding to |key|. If found,
149 // returns the found entry. Otherwise, creates a new entry and returns that. 153 // returns the found entry. Otherwise, creates a new entry and returns that.
150 scoped_refptr<SimpleEntryImpl> CreateOrFindActiveEntry( 154 scoped_refptr<SimpleEntryImpl> CreateOrFindActiveEntry(
151 uint64 entry_hash, 155 uint64 entry_hash,
152 const std::string& key); 156 const std::string& key);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // is complete. The base::Closure map target is used to store deferred 208 // is complete. The base::Closure map target is used to store deferred
205 // operations to be run at the completion of the Doom. 209 // operations to be run at the completion of the Doom.
206 base::hash_map<uint64, std::vector<base::Closure> > entries_pending_doom_; 210 base::hash_map<uint64, std::vector<base::Closure> > entries_pending_doom_;
207 211
208 net::NetLog* const net_log_; 212 net::NetLog* const net_log_;
209 }; 213 };
210 214
211 } // namespace disk_cache 215 } // namespace disk_cache
212 216
213 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ 217 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_
OLDNEW
« no previous file with comments | « net/disk_cache/memory/mem_backend_impl.cc ('k') | net/disk_cache/simple/simple_backend_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698