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

Unified Diff: net/disk_cache/eviction.cc

Issue 2854053: Disk cache: Stop evictions while performing final cleanup.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 5 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
« net/disk_cache/backend_impl.h ('K') | « net/disk_cache/eviction.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/eviction.cc
===================================================================
--- net/disk_cache/eviction.cc (revision 52555)
+++ net/disk_cache/eviction.cc (working copy)
@@ -70,8 +70,19 @@
trimming_ = false;
delay_trim_ = false;
trim_delays_ = 0;
+ init_ = true;
}
+void Eviction::Stop() {
+ if (!init_)
+ return;
gavinp 2010/07/19 22:20:31 NOTREACHED() ?
rvargas (doing something else) 2010/07/19 23:48:28 I added a comment explaining when we'll reach Stop
+
+ // We want to stop further evictions, so let's pretend that we are busy from
+ // this point on.
+ DCHECK(!trimming_);
+ trimming_ = true;
+}
+
void Eviction::TrimCache(bool empty) {
if (backend_->disabled_ || trimming_)
return;
« net/disk_cache/backend_impl.h ('K') | « net/disk_cache/eviction.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698