diff options
author | rnk@chromium.org <rnk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-23 16:25:43 +0000 |
---|---|---|
committer | rnk@chromium.org <rnk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-23 16:25:43 +0000 |
commit | 32793338010caebb42a4f32801b025c26be388fd (patch) | |
tree | ebd92c6275a49a77b0963b7ec20dd1113d75e7cb /net/disk_cache | |
parent | 8506e424b0106af9ac60351951cb6f2048810370 (diff) | |
download | chromium_src-32793338010caebb42a4f32801b025c26be388fd.zip chromium_src-32793338010caebb42a4f32801b025c26be388fd.tar.gz chromium_src-32793338010caebb42a4f32801b025c26be388fd.tar.bz2 |
Revert "Refactor BaseTimer to avoid spamming the MessageLoop with orphaned tasks."
This reverts commit r128412, which is causing DCHECKs in thread
destruction in media unittests.
BUG=119714,119750
TBR=sky@chromium.org,petermayo@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9839059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128506 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache')
-rw-r--r-- | net/disk_cache/backend_impl.cc | 7 | ||||
-rw-r--r-- | net/disk_cache/backend_impl.h | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc index 1f08b15..aa232c3 100644 --- a/net/disk_cache/backend_impl.cc +++ b/net/disk_cache/backend_impl.cc @@ -423,9 +423,8 @@ int BackendImpl::SyncInit() { trace_object_ = TraceObject::GetTraceObject(); // Create a recurrent timer of 30 secs. int timer_delay = unit_test_ ? 1000 : 30000; - timer_.reset(new base::RepeatingTimer<BackendImpl>()); - timer_->Start(FROM_HERE, TimeDelta::FromMilliseconds(timer_delay), this, - &BackendImpl::OnStatsTimer); + timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(timer_delay), this, + &BackendImpl::OnStatsTimer); } init_ = true; @@ -498,7 +497,7 @@ int BackendImpl::SyncInit() { void BackendImpl::CleanupCache() { Trace("Backend Cleanup"); eviction_.Stop(); - timer_.reset(); + timer_.Stop(); if (init_) { stats_.Store(); diff --git a/net/disk_cache/backend_impl.h b/net/disk_cache/backend_impl.h index 663f7fc..e2fb6ef 100644 --- a/net/disk_cache/backend_impl.h +++ b/net/disk_cache/backend_impl.h @@ -383,7 +383,7 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend { net::NetLog* net_log_; Stats stats_; // Usage statistics. - scoped_ptr<base::RepeatingTimer<BackendImpl> > timer_; // Usage timer. + base::RepeatingTimer<BackendImpl> timer_; // Usage timer. base::WaitableEvent done_; // Signals the end of background work. scoped_refptr<TraceObject> trace_object_; // Initializes internal tracing. base::WeakPtrFactory<BackendImpl> ptr_factory_; |