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

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

Issue 15829004: Update net/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: license twerk Created 7 years, 6 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/disk_cache_perftest.cc ('k') | net/disk_cache/entry_unittest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/hash.h" 7 #include "base/hash.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 DCHECK(backend_); 1199 DCHECK(backend_);
1200 if (!address.is_initialized()) 1200 if (!address.is_initialized())
1201 return; 1201 return;
1202 if (address.is_separate_file()) { 1202 if (address.is_separate_file()) {
1203 int failure = !DeleteCacheFile(backend_->GetFileName(address)); 1203 int failure = !DeleteCacheFile(backend_->GetFileName(address));
1204 CACHE_UMA(COUNTS, "DeleteFailed", 0, failure); 1204 CACHE_UMA(COUNTS, "DeleteFailed", 0, failure);
1205 if (failure) { 1205 if (failure) {
1206 LOG(ERROR) << "Failed to delete " << 1206 LOG(ERROR) << "Failed to delete " <<
1207 backend_->GetFileName(address).value() << " from the cache."; 1207 backend_->GetFileName(address).value() << " from the cache.";
1208 } 1208 }
1209 if (files_[index]) 1209 if (files_[index].get())
1210 files_[index] = NULL; // Releases the object. 1210 files_[index] = NULL; // Releases the object.
1211 } else { 1211 } else {
1212 backend_->DeleteBlock(address, true); 1212 backend_->DeleteBlock(address, true);
1213 } 1213 }
1214 } 1214 }
1215 1215
1216 void EntryImpl::UpdateRank(bool modified) { 1216 void EntryImpl::UpdateRank(bool modified) {
1217 if (!backend_) 1217 if (!backend_)
1218 return; 1218 return;
1219 1219
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 Trace("%s 0x%p 0x%x 0x%x", msg, reinterpret_cast<void*>(this), 1540 Trace("%s 0x%p 0x%x 0x%x", msg, reinterpret_cast<void*>(this),
1541 entry_.address().value(), node_.address().value()); 1541 entry_.address().value(), node_.address().value());
1542 1542
1543 Trace(" data: 0x%x 0x%x 0x%x", entry_.Data()->data_addr[0], 1543 Trace(" data: 0x%x 0x%x 0x%x", entry_.Data()->data_addr[0],
1544 entry_.Data()->data_addr[1], entry_.Data()->long_key); 1544 entry_.Data()->data_addr[1], entry_.Data()->long_key);
1545 1545
1546 Trace(" doomed: %d 0x%x", doomed_, dirty); 1546 Trace(" doomed: %d 0x%x", doomed_, dirty);
1547 } 1547 }
1548 1548
1549 } // namespace disk_cache 1549 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/disk_cache_perftest.cc ('k') | net/disk_cache/entry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698