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

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

Issue 70183004: Simple Cache: Turn some DCHECKs into CHECKs (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add TODO comments. Created 7 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 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 798e05329ffa361a74d72790cdf519e1ed53ebde..90dfc5404af214dc462a4c6400bf51864aad1fea 100644
--- a/net/disk_cache/simple/simple_backend_impl.cc
+++ b/net/disk_cache/simple/simple_backend_impl.cc
@@ -258,13 +258,15 @@ void SimpleBackendImpl::OnDeactivated(const SimpleEntryImpl* entry) {
}
void SimpleBackendImpl::OnDoomStart(uint64 entry_hash) {
- DCHECK_EQ(0u, entries_pending_doom_.count(entry_hash));
+ // TODO(ttuttle): Revert to DCHECK once http://crbug.com/317138 is fixed.
+ CHECK_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) {
- DCHECK_EQ(1u, entries_pending_doom_.count(entry_hash));
+ // TODO(ttuttle): Revert to DCHECK once http://crbug.com/317138 is fixed.
+ CHECK_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,8 +292,9 @@ 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];
- DCHECK(active_entries_.count(entry_hash) == 0 ||
- entries_pending_doom_.count(entry_hash) == 0)
+ // 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.";
if (!active_entries_.count(entry_hash) &&
@@ -312,7 +315,8 @@ 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);
- DCHECK_EQ(net::ERR_IO_PENDING, doom_result);
+ // TODO(ttuttle): Revert to DCHECK once http://crbug.com/317138 is fixed.
+ CHECK_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