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

Unified Diff: net/disk_cache/simple/simple_backend_impl.cc

Issue 509993002: Downgrade all CHECKs to DCHECKs in SimpleCache backend. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_backend_impl.cc
diff --git a/net/disk_cache/simple/simple_backend_impl.cc b/net/disk_cache/simple/simple_backend_impl.cc
index 76335a754a2509386b85a267245fa761f5c4965b..5447c105ec734e3d2d41e7dadfca53c3d37dc6b9 100644
--- a/net/disk_cache/simple/simple_backend_impl.cc
+++ b/net/disk_cache/simple/simple_backend_impl.cc
@@ -256,15 +256,13 @@ void SimpleBackendImpl::OnDeactivated(const SimpleEntryImpl* entry) {
}
void SimpleBackendImpl::OnDoomStart(uint64 entry_hash) {
- // TODO(ttuttle): Revert to DCHECK once http://crbug.com/317138 is fixed.
- CHECK_EQ(0u, entries_pending_doom_.count(entry_hash));
+ DCHECK_EQ(0u, entries_pending_doom_.count(entry_hash));
entries_pending_doom_.insert(
std::make_pair(entry_hash, std::vector<Closure>()));
}
void SimpleBackendImpl::OnDoomComplete(uint64 entry_hash) {
- // TODO(ttuttle): Revert to DCHECK once http://crbug.com/317138 is fixed.
- CHECK_EQ(1u, entries_pending_doom_.count(entry_hash));
+ DCHECK_EQ(1u, entries_pending_doom_.count(entry_hash));
base::hash_map<uint64, std::vector<Closure> >::iterator it =
entries_pending_doom_.find(entry_hash);
std::vector<Closure> to_run_closures;
@@ -290,11 +288,8 @@ void SimpleBackendImpl::DoomEntries(std::vector<uint64>* entry_hashes,
// SimpleSynchronousEntry::DoomEntrySet and delete the files en masse.
for (int i = mass_doom_entry_hashes->size() - 1; i >= 0; --i) {
const uint64 entry_hash = (*mass_doom_entry_hashes)[i];
- // TODO(ttuttle): Revert to DCHECK once http://crbug.com/317138 is fixed.
- CHECK(active_entries_.count(entry_hash) == 0 ||
- entries_pending_doom_.count(entry_hash) == 0)
- << "The entry 0x" << std::hex << entry_hash
- << " is both active and pending doom.";
+ DCHECK(active_entries_.count(entry_hash) == 0 ||
+ entries_pending_doom_.count(entry_hash) == 0);
if (!active_entries_.count(entry_hash) &&
!entries_pending_doom_.count(entry_hash)) {
continue;
@@ -313,8 +308,7 @@ void SimpleBackendImpl::DoomEntries(std::vector<uint64>* entry_hashes,
it = to_doom_individually_hashes.begin(),
end = to_doom_individually_hashes.end(); it != end; ++it) {
const int doom_result = DoomEntryFromHash(*it, barrier_callback);
- // TODO(ttuttle): Revert to DCHECK once http://crbug.com/317138 is fixed.
- CHECK_EQ(net::ERR_IO_PENDING, doom_result);
+ DCHECK_EQ(net::ERR_IO_PENDING, doom_result);
index_->Remove(*it);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698