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

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

Issue 48112: Disk cache: First implementation of TrimDeleted() and a few... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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/disk_cache.h » ('j') | net/disk_cache/eviction.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include "net/disk_cache/backend_impl.h" 5 #include "net/disk_cache/backend_impl.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/histogram.h" 8 #include "base/histogram.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 634
635 stats_.OnEvent(Stats::DOOM_ENTRY); 635 stats_.OnEvent(Stats::DOOM_ENTRY);
636 } 636 }
637 637
638 // An entry may be linked on the DELETED list for a while after being doomed. 638 // An entry may be linked on the DELETED list for a while after being doomed.
639 // This function is called when we want to remove it. 639 // This function is called when we want to remove it.
640 void BackendImpl::RemoveEntry(EntryImpl* entry) { 640 void BackendImpl::RemoveEntry(EntryImpl* entry) {
641 if (!new_eviction_) 641 if (!new_eviction_)
642 return; 642 return;
643 643
644 DCHECK(ENTRY_DOOMED == entry->entry()->Data()->state); 644 DCHECK(ENTRY_NORMAL != entry->entry()->Data()->state);
645 645
646 Trace("Remove entry 0x%p", entry); 646 Trace("Remove entry 0x%p", entry);
647 eviction_.OnDestroyEntry(entry); 647 eviction_.OnDestroyEntry(entry);
648 DecreaseNumEntries(); 648 DecreaseNumEntries();
649 } 649 }
650 650
651 void BackendImpl::CacheEntryDestroyed() { 651 void BackendImpl::CacheEntryDestroyed() {
652 DecreaseNumRefs(); 652 DecreaseNumRefs();
653 } 653 }
654 654
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 1338
1339 return num_dirty; 1339 return num_dirty;
1340 } 1340 }
1341 1341
1342 bool BackendImpl::CheckEntry(EntryImpl* cache_entry) { 1342 bool BackendImpl::CheckEntry(EntryImpl* cache_entry) {
1343 RankingsNode* rankings = cache_entry->rankings()->Data(); 1343 RankingsNode* rankings = cache_entry->rankings()->Data();
1344 return !rankings->pointer; 1344 return !rankings->pointer;
1345 } 1345 }
1346 1346
1347 } // namespace disk_cache 1347 } // namespace disk_cache
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/disk_cache.h » ('j') | net/disk_cache/eviction.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698