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

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

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | net/disk_cache/file_posix.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 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 DCHECK(backend_); 1196 DCHECK(backend_);
1197 if (!address.is_initialized()) 1197 if (!address.is_initialized())
1198 return; 1198 return;
1199 if (address.is_separate_file()) { 1199 if (address.is_separate_file()) {
1200 int failure = !DeleteCacheFile(backend_->GetFileName(address)); 1200 int failure = !DeleteCacheFile(backend_->GetFileName(address));
1201 CACHE_UMA(COUNTS, "DeleteFailed", 0, failure); 1201 CACHE_UMA(COUNTS, "DeleteFailed", 0, failure);
1202 if (failure) { 1202 if (failure) {
1203 LOG(ERROR) << "Failed to delete " << 1203 LOG(ERROR) << "Failed to delete " <<
1204 backend_->GetFileName(address).value() << " from the cache."; 1204 backend_->GetFileName(address).value() << " from the cache.";
1205 } 1205 }
1206 if (files_[index]) 1206 if (files_[index].get())
1207 files_[index] = NULL; // Releases the object. 1207 files_[index] = NULL; // Releases the object.
1208 } else { 1208 } else {
1209 backend_->DeleteBlock(address, true); 1209 backend_->DeleteBlock(address, true);
1210 } 1210 }
1211 } 1211 }
1212 1212
1213 void EntryImpl::UpdateRank(bool modified) { 1213 void EntryImpl::UpdateRank(bool modified) {
1214 if (!backend_) 1214 if (!backend_)
1215 return; 1215 return;
1216 1216
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 Trace("%s 0x%p 0x%x 0x%x", msg, reinterpret_cast<void*>(this), 1537 Trace("%s 0x%p 0x%x 0x%x", msg, reinterpret_cast<void*>(this),
1538 entry_.address().value(), node_.address().value()); 1538 entry_.address().value(), node_.address().value());
1539 1539
1540 Trace(" data: 0x%x 0x%x 0x%x", entry_.Data()->data_addr[0], 1540 Trace(" data: 0x%x 0x%x 0x%x", entry_.Data()->data_addr[0],
1541 entry_.Data()->data_addr[1], entry_.Data()->long_key); 1541 entry_.Data()->data_addr[1], entry_.Data()->long_key);
1542 1542
1543 Trace(" doomed: %d 0x%x", doomed_, dirty); 1543 Trace(" doomed: %d 0x%x", doomed_, dirty);
1544 } 1544 }
1545 1545
1546 } // namespace disk_cache 1546 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | net/disk_cache/file_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698