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

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

Issue 48155: Disk cache: A few minor fixes to make coverity happy. (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 | « net/disk_cache/backend_unittest.cc ('k') | net/disk_cache/file_win.cc » ('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/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 backend_->DecrementIoCount(); 572 backend_->DecrementIoCount();
573 } 573 }
574 574
575 void EntryImpl::SetTimes(base::Time last_used, base::Time last_modified) { 575 void EntryImpl::SetTimes(base::Time last_used, base::Time last_modified) {
576 node_.Data()->last_used = last_used.ToInternalValue(); 576 node_.Data()->last_used = last_used.ToInternalValue();
577 node_.Data()->last_modified = last_modified.ToInternalValue(); 577 node_.Data()->last_modified = last_modified.ToInternalValue();
578 node_.set_modified(); 578 node_.set_modified();
579 } 579 }
580 580
581 bool EntryImpl::CreateDataBlock(int index, int size) { 581 bool EntryImpl::CreateDataBlock(int index, int size) {
582 Addr address(entry_.Data()->data_addr[index]);
583 DCHECK(index >= 0 && index < NUM_STREAMS); 582 DCHECK(index >= 0 && index < NUM_STREAMS);
584 583
584 Addr address(entry_.Data()->data_addr[index]);
585 if (!CreateBlock(size, &address)) 585 if (!CreateBlock(size, &address))
586 return false; 586 return false;
587 587
588 entry_.Data()->data_addr[index] = address.value(); 588 entry_.Data()->data_addr[index] = address.value();
589 entry_.Store(); 589 entry_.Store();
590 return true; 590 return true;
591 } 591 }
592 592
593 bool EntryImpl::CreateBlock(int size, Addr* address) { 593 bool EntryImpl::CreateBlock(int size, Addr* address) {
594 DCHECK(!address->is_initialized()); 594 DCHECK(!address->is_initialized());
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 Trace("%s 0x%p 0x%x 0x%x", msg, reinterpret_cast<void*>(this), 848 Trace("%s 0x%p 0x%x 0x%x", msg, reinterpret_cast<void*>(this),
849 entry_.address().value(), node_.address().value()); 849 entry_.address().value(), node_.address().value());
850 850
851 Trace(" data: 0x%x 0x%x 0x%x", entry_.Data()->data_addr[0], 851 Trace(" data: 0x%x 0x%x 0x%x", entry_.Data()->data_addr[0],
852 entry_.Data()->data_addr[1], entry_.Data()->long_key); 852 entry_.Data()->data_addr[1], entry_.Data()->long_key);
853 853
854 Trace(" doomed: %d 0x%p 0x%x", doomed_, pointer, dirty); 854 Trace(" doomed: %d 0x%p 0x%x", doomed_, pointer, dirty);
855 } 855 }
856 856
857 } // namespace disk_cache 857 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | net/disk_cache/file_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698