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

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

Issue 12851: Disk cache: Add a tool to upgrade a set of cache files from one version to... (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/entry_impl.h ('k') | net/dump_cache.scons » ('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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 } 492 }
493 493
494 void EntryImpl::IncrementIoCount() { 494 void EntryImpl::IncrementIoCount() {
495 backend_->IncrementIoCount(); 495 backend_->IncrementIoCount();
496 } 496 }
497 497
498 void EntryImpl::DecrementIoCount() { 498 void EntryImpl::DecrementIoCount() {
499 backend_->DecrementIoCount(); 499 backend_->DecrementIoCount();
500 } 500 }
501 501
502 void EntryImpl::SetTimes(base::Time last_used, base::Time last_modified) {
503 node_.Data()->last_used = last_used.ToInternalValue();
504 node_.Data()->last_modified = last_modified.ToInternalValue();
505 node_.set_modified();
506 }
507
502 bool EntryImpl::CreateDataBlock(int index, int size) { 508 bool EntryImpl::CreateDataBlock(int index, int size) {
503 Addr address(entry_.Data()->data_addr[index]); 509 Addr address(entry_.Data()->data_addr[index]);
504 DCHECK(0 == index || 1 == index); 510 DCHECK(0 == index || 1 == index);
505 511
506 if (!CreateBlock(size, &address)) 512 if (!CreateBlock(size, &address))
507 return false; 513 return false;
508 514
509 entry_.Data()->data_addr[index] = address.value(); 515 entry_.Data()->data_addr[index] = address.value();
510 entry_.Store(); 516 entry_.Store();
511 return true; 517 return true;
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 entry_.address().value(), node_.address().value()); 766 entry_.address().value(), node_.address().value());
761 767
762 Trace(" data: 0x%x 0x%x 0x%x", entry_.Data()->data_addr[0], 768 Trace(" data: 0x%x 0x%x 0x%x", entry_.Data()->data_addr[0],
763 entry_.Data()->data_addr[1], entry_.Data()->long_key); 769 entry_.Data()->data_addr[1], entry_.Data()->long_key);
764 770
765 Trace(" doomed: %d 0x%p 0x%x", doomed_, pointer, dirty); 771 Trace(" doomed: %d 0x%p 0x%x", doomed_, pointer, dirty);
766 } 772 }
767 773
768 } // namespace disk_cache 774 } // namespace disk_cache
769 775
OLDNEW
« no previous file with comments | « net/disk_cache/entry_impl.h ('k') | net/dump_cache.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698