summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/eviction.cc
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-23 20:51:34 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-23 20:51:34 +0000
commit2da659e6279cf515940eb8a091e09e27281a97d6 (patch)
treea34e2eeea8194a16603e24149ae634cb54ddab62 /net/disk_cache/eviction.cc
parent954f56f3aceed29573f841648168b91c1fd43074 (diff)
downloadchromium_src-2da659e6279cf515940eb8a091e09e27281a97d6.zip
chromium_src-2da659e6279cf515940eb8a091e09e27281a97d6.tar.gz
chromium_src-2da659e6279cf515940eb8a091e09e27281a97d6.tar.bz2
net: Use base::MessageLoop.
BUG=236029 R=agl@chromium.org Review URL: https://chromiumcodereview.appspot.com/14021017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201882 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/eviction.cc')
-rw-r--r--net/disk_cache/eviction.cc19
1 files changed, 12 insertions, 7 deletions
diff --git a/net/disk_cache/eviction.cc b/net/disk_cache/eviction.cc
index 097f48c..d2378e6 100644
--- a/net/disk_cache/eviction.cc
+++ b/net/disk_cache/eviction.cc
@@ -142,8 +142,9 @@ void Eviction::TrimCache(bool empty) {
}
if (!empty && (deleted_entries > 20 ||
(TimeTicks::Now() - start).InMilliseconds() > 20)) {
- MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
- &Eviction::TrimCache, ptr_factory_.GetWeakPtr(), false));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&Eviction::TrimCache, ptr_factory_.GetWeakPtr(), false));
break;
}
}
@@ -209,7 +210,8 @@ void Eviction::PostDelayedTrim() {
return;
delay_trim_ = true;
trim_delays_++;
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
base::Bind(&Eviction::DelayedTrim, ptr_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(1000));
}
@@ -365,8 +367,9 @@ void Eviction::TrimCacheV2(bool empty) {
}
if (!empty && (deleted_entries > 20 ||
(TimeTicks::Now() - start).InMilliseconds() > 20)) {
- MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
- &Eviction::TrimCache, ptr_factory_.GetWeakPtr(), false));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&Eviction::TrimCache, ptr_factory_.GetWeakPtr(), false));
break;
}
}
@@ -377,7 +380,8 @@ void Eviction::TrimCacheV2(bool empty) {
if (empty) {
TrimDeleted(true);
} else if (ShouldTrimDeleted()) {
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
base::Bind(&Eviction::TrimDeleted, ptr_factory_.GetWeakPtr(), empty));
}
@@ -509,7 +513,8 @@ void Eviction::TrimDeleted(bool empty) {
}
if (deleted_entries && !empty && ShouldTrimDeleted()) {
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
base::Bind(&Eviction::TrimDeleted, ptr_factory_.GetWeakPtr(), false));
}