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

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

Issue 14141: Disk cache: remove the hard coded list from rankings.cc... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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 | « net/disk_cache/backend_impl.cc ('k') | net/disk_cache/rankings.h » ('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) 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/entry_impl.h" 5 #include "net/disk_cache/entry_impl.h"
6 6
7 #include "base/histogram.h" 7 #include "base/histogram.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 " from the cache."; 555 " from the cache.";
556 } 556 }
557 } else { 557 } else {
558 backend_->DeleteBlock(address, true); 558 backend_->DeleteBlock(address, true);
559 } 559 }
560 } 560 }
561 561
562 void EntryImpl::UpdateRank(bool modified) { 562 void EntryImpl::UpdateRank(bool modified) {
563 if (!doomed_) { 563 if (!doomed_) {
564 // Everything is handled by the backend. 564 // Everything is handled by the backend.
565 backend_->UpdateRank(&node_, true); 565 backend_->UpdateRank(this, true);
566 return; 566 return;
567 } 567 }
568 568
569 Time current = Time::Now(); 569 Time current = Time::Now();
570 node_.Data()->last_used = current.ToInternalValue(); 570 node_.Data()->last_used = current.ToInternalValue();
571 571
572 if (modified) 572 if (modified)
573 node_.Data()->last_modified = current.ToInternalValue(); 573 node_.Data()->last_modified = current.ToInternalValue();
574 } 574 }
575 575
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 entry_.address().value(), node_.address().value()); 772 entry_.address().value(), node_.address().value());
773 773
774 Trace(" data: 0x%x 0x%x 0x%x", entry_.Data()->data_addr[0], 774 Trace(" data: 0x%x 0x%x 0x%x", entry_.Data()->data_addr[0],
775 entry_.Data()->data_addr[1], entry_.Data()->long_key); 775 entry_.Data()->data_addr[1], entry_.Data()->long_key);
776 776
777 Trace(" doomed: %d 0x%p 0x%x", doomed_, pointer, dirty); 777 Trace(" doomed: %d 0x%p 0x%x", doomed_, pointer, dirty);
778 } 778 }
779 779
780 } // namespace disk_cache 780 } // namespace disk_cache
781 781
OLDNEW
« no previous file with comments | « net/disk_cache/backend_impl.cc ('k') | net/disk_cache/rankings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698