Index: net/disk_cache/eviction.cc |
=================================================================== |
--- net/disk_cache/eviction.cc (revision 199883) |
+++ net/disk_cache/eviction.cc (working copy) |
@@ -35,6 +35,7 @@ |
#include "base/string_util.h" |
#include "base/time.h" |
#include "net/disk_cache/backend_impl.h" |
+#include "net/disk_cache/disk_format.h" |
#include "net/disk_cache/entry_impl.h" |
#include "net/disk_cache/experiments.h" |
#include "net/disk_cache/histogram_macros.h" |
@@ -142,8 +143,9 @@ |
} |
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 +211,8 @@ |
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)); |
} |
@@ -297,13 +300,9 @@ |
entry->entry()->Store(); |
rankings_->Insert(entry->rankings(), true, Rankings::DELETED); |
} |
- if (!empty) { |
+ if (!empty) |
backend_->OnEvent(Stats::TRIM_ENTRY); |
- static const char gajs[] = "http://www.google-analytics.com/ga.js"; |
- if (!entry->GetKey().compare(gajs)) |
- backend_->OnEvent(Stats::GAJS_EVICTED); |
- } |
entry->Release(); |
return true; |
@@ -365,8 +364,9 @@ |
} |
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 +377,8 @@ |
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 +510,8 @@ |
} |
if (deleted_entries && !empty && ShouldTrimDeleted()) { |
- MessageLoop::current()->PostTask(FROM_HERE, |
+ base::MessageLoop::current()->PostTask( |
+ FROM_HERE, |
base::Bind(&Eviction::TrimDeleted, ptr_factory_.GetWeakPtr(), false)); |
} |