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

Side by Side Diff: net/disk_cache/blockfile/backend_impl_v3.h

Issue 547513002: Remove disk_cache::BackendImpl::OpenPrevEntry() and all users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: narrower Created 6 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // See net/disk_cache/disk_cache.h for the public interface of the cache. 5 // See net/disk_cache/disk_cache.h for the public interface of the cache.
6 6
7 #ifndef NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_ 7 #ifndef NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_
8 #define NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_ 8 #define NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 }; 48 };
49 49
50 BackendImplV3(const base::FilePath& path, 50 BackendImplV3(const base::FilePath& path,
51 const scoped_refptr<base::SingleThreadTaskRunner>& cache_thread, 51 const scoped_refptr<base::SingleThreadTaskRunner>& cache_thread,
52 net::NetLog* net_log); 52 net::NetLog* net_log);
53 virtual ~BackendImplV3(); 53 virtual ~BackendImplV3();
54 54
55 // Performs general initialization for this current instance of the cache. 55 // Performs general initialization for this current instance of the cache.
56 int Init(const CompletionCallback& callback); 56 int Init(const CompletionCallback& callback);
57 57
58 // Same behavior as OpenNextEntry but walks the list from back to front.
59 int OpenPrevEntry(void** iter, Entry** prev_entry,
60 const CompletionCallback& callback);
61
62 // Sets the maximum size for the total amount of data stored by this instance. 58 // Sets the maximum size for the total amount of data stored by this instance.
63 bool SetMaxSize(int max_bytes); 59 bool SetMaxSize(int max_bytes);
64 60
65 // Sets the cache type for this backend. 61 // Sets the cache type for this backend.
66 void SetType(net::CacheType type); 62 void SetType(net::CacheType type);
67 63
68 // Creates a new storage block of size block_count. 64 // Creates a new storage block of size block_count.
69 bool CreateBlock(FileType block_type, int block_count, 65 bool CreateBlock(FileType block_type, int block_count,
70 Addr* block_address); 66 Addr* block_address);
71 67
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 void RestartCache(bool failure); 205 void RestartCache(bool failure);
210 void PrepareForRestart(); 206 void PrepareForRestart();
211 207
212 // Performs final cleanup. 208 // Performs final cleanup.
213 void CleanupCache(); 209 void CleanupCache();
214 210
215 // Creates a new entry object. Returns zero on success, or a disk_cache error 211 // Creates a new entry object. Returns zero on success, or a disk_cache error
216 // on failure. 212 // on failure.
217 int NewEntry(Addr address, EntryImplV3** entry); 213 int NewEntry(Addr address, EntryImplV3** entry);
218 214
219 // Opens the next or previous entry on a cache iteration.
220 int OpenFollowingEntry(bool forward, void** iter, Entry** next_entry,
221 const CompletionCallback& callback);
222
223 // Handles the used storage count. 215 // Handles the used storage count.
224 void AddStorageSize(int32 bytes); 216 void AddStorageSize(int32 bytes);
225 void SubstractStorageSize(int32 bytes); 217 void SubstractStorageSize(int32 bytes);
226 218
227 // Update the number of referenced cache entries. 219 // Update the number of referenced cache entries.
228 void IncreaseNumRefs(); 220 void IncreaseNumRefs();
229 void DecreaseNumRefs(); 221 void DecreaseNumRefs();
230 void IncreaseNumEntries(); 222 void IncreaseNumEntries();
231 void DecreaseNumEntries(); 223 void DecreaseNumEntries();
232 224
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 scoped_ptr<base::RepeatingTimer<BackendImplV3> > timer_; // Usage timer. 272 scoped_ptr<base::RepeatingTimer<BackendImplV3> > timer_; // Usage timer.
281 scoped_refptr<TraceObject> trace_object_; // Initializes internal tracing. 273 scoped_refptr<TraceObject> trace_object_; // Initializes internal tracing.
282 base::WeakPtrFactory<BackendImplV3> ptr_factory_; 274 base::WeakPtrFactory<BackendImplV3> ptr_factory_;
283 275
284 DISALLOW_COPY_AND_ASSIGN(BackendImplV3); 276 DISALLOW_COPY_AND_ASSIGN(BackendImplV3);
285 }; 277 };
286 278
287 } // namespace disk_cache 279 } // namespace disk_cache
288 280
289 #endif // NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_ 281 #endif // NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698