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

Side by Side Diff: net/disk_cache/backend_impl.h

Issue 8065015: Disk Cache: Improve handling of dirty entries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | net/disk_cache/backend_impl.cc » ('j') | net/disk_cache/backend_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BACKEND_IMPL_H_ 7 #ifndef NET_DISK_CACHE_BACKEND_IMPL_H_
8 #define NET_DISK_CACHE_BACKEND_IMPL_H_ 8 #define NET_DISK_CACHE_BACKEND_IMPL_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // Opens the next or previous entry on a cache iteration. 295 // Opens the next or previous entry on a cache iteration.
296 EntryImpl* OpenFollowingEntry(bool forward, void** iter); 296 EntryImpl* OpenFollowingEntry(bool forward, void** iter);
297 297
298 // Opens the next or previous entry on a single list. If successfull, 298 // Opens the next or previous entry on a single list. If successfull,
299 // |from_entry| will be updated to point to the new entry, otherwise it will 299 // |from_entry| will be updated to point to the new entry, otherwise it will
300 // be set to NULL; in other words, it is used as an explicit iterator. 300 // be set to NULL; in other words, it is used as an explicit iterator.
301 bool OpenFollowingEntryFromList(bool forward, Rankings::List list, 301 bool OpenFollowingEntryFromList(bool forward, Rankings::List list,
302 CacheRankingsBlock** from_entry, 302 CacheRankingsBlock** from_entry,
303 EntryImpl** next_entry); 303 EntryImpl** next_entry);
304 304
305 // Returns the entry that is pointed by |next|. 305 // Returns the entry that is pointed by |next|, from the given |list|.
306 EntryImpl* GetEnumeratedEntry(CacheRankingsBlock* next); 306 EntryImpl* GetEnumeratedEntry(CacheRankingsBlock* next, Rankings::List list);
307 307
308 // Re-opens an entry that was previously deleted. 308 // Re-opens an entry that was previously deleted.
309 EntryImpl* ResurrectEntry(EntryImpl* deleted_entry); 309 EntryImpl* ResurrectEntry(EntryImpl* deleted_entry);
310 310
311 void DestroyInvalidEntry(EntryImpl* entry); 311 void DestroyInvalidEntry(EntryImpl* entry);
312 312
313 // Handles the used storage count. 313 // Handles the used storage count.
314 void AddStorageSize(int32 bytes); 314 void AddStorageSize(int32 bytes);
315 void SubstractStorageSize(int32 bytes); 315 void SubstractStorageSize(int32 bytes);
316 316
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 381
382 DISALLOW_COPY_AND_ASSIGN(BackendImpl); 382 DISALLOW_COPY_AND_ASSIGN(BackendImpl);
383 }; 383 };
384 384
385 // Returns the prefered max cache size given the available disk space. 385 // Returns the prefered max cache size given the available disk space.
386 NET_EXPORT_PRIVATE int PreferedCacheSize(int64 available); 386 NET_EXPORT_PRIVATE int PreferedCacheSize(int64 available);
387 387
388 } // namespace disk_cache 388 } // namespace disk_cache
389 389
390 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_ 390 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/backend_impl.cc » ('j') | net/disk_cache/backend_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698