| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |