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

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

Issue 1401053004: Revert of Implement cache counting for the simple and memory backends. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
147 // Try to create the directory if it doesn't exist. This must run on the IO 143 // Try to create the directory if it doesn't exist. This must run on the IO
148 // thread. 144 // thread.
149 static DiskStatResult InitCacheStructureOnDisk(const base::FilePath& path, 145 static DiskStatResult InitCacheStructureOnDisk(const base::FilePath& path,
150 uint64 suggested_max_size); 146 uint64 suggested_max_size);
151 147
152 // Searches |active_entries_| for the entry corresponding to |key|. If found, 148 // Searches |active_entries_| for the entry corresponding to |key|. If found,
153 // returns the found entry. Otherwise, creates a new entry and returns that. 149 // returns the found entry. Otherwise, creates a new entry and returns that.
154 scoped_refptr<SimpleEntryImpl> CreateOrFindActiveEntry( 150 scoped_refptr<SimpleEntryImpl> CreateOrFindActiveEntry(
155 uint64 entry_hash, 151 uint64 entry_hash,
156 const std::string& key); 152 const std::string& key);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 // is complete. The base::Closure map target is used to store deferred 204 // is complete. The base::Closure map target is used to store deferred
209 // operations to be run at the completion of the Doom. 205 // operations to be run at the completion of the Doom.
210 base::hash_map<uint64, std::vector<base::Closure> > entries_pending_doom_; 206 base::hash_map<uint64, std::vector<base::Closure> > entries_pending_doom_;
211 207
212 net::NetLog* const net_log_; 208 net::NetLog* const net_log_;
213 }; 209 };
214 210
215 } // namespace disk_cache 211 } // namespace disk_cache
216 212
217 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ 213 #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