summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/backend_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/disk_cache/backend_impl.cc')
-rw-r--r--net/disk_cache/backend_impl.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc
index aa232c3..1f08b15 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/backend_impl.cc
@@ -423,8 +423,9 @@ int BackendImpl::SyncInit() {
trace_object_ = TraceObject::GetTraceObject();
// Create a recurrent timer of 30 secs.
int timer_delay = unit_test_ ? 1000 : 30000;
- timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(timer_delay), this,
- &BackendImpl::OnStatsTimer);
+ timer_.reset(new base::RepeatingTimer<BackendImpl>());
+ timer_->Start(FROM_HERE, TimeDelta::FromMilliseconds(timer_delay), this,
+ &BackendImpl::OnStatsTimer);
}
init_ = true;
@@ -497,7 +498,7 @@ int BackendImpl::SyncInit() {
void BackendImpl::CleanupCache() {
Trace("Backend Cleanup");
eviction_.Stop();
- timer_.Stop();
+ timer_.reset();
if (init_) {
stats_.Store();