Chromium Code Reviews| 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; |