Index: webkit/quota/quota_temporary_storage_evictor.cc |
diff --git a/webkit/quota/quota_temporary_storage_evictor.cc b/webkit/quota/quota_temporary_storage_evictor.cc |
index 0e919f61f7fd0c04710ae20f14421ebddba4a5a6..30bac6d8de37647c7bbd9448e6a0e2525b11f265 100644 |
--- a/webkit/quota/quota_temporary_storage_evictor.cc |
+++ b/webkit/quota/quota_temporary_storage_evictor.cc |
@@ -4,6 +4,8 @@ |
#include "webkit/quota/quota_temporary_storage_evictor.h" |
+#include <algorithm> |
+ |
#include "base/bind.h" |
#include "base/metrics/histogram.h" |
#include "googleurl/src/gurl.h" |
@@ -41,7 +43,6 @@ QuotaTemporaryStorageEvictor::QuotaTemporaryStorageEvictor( |
quota_eviction_handler_(quota_eviction_handler), |
interval_ms_(interval_ms), |
repeated_eviction_(true), |
- callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { |
DCHECK(quota_eviction_handler); |
} |
@@ -218,8 +219,9 @@ void QuotaTemporaryStorageEvictor::OnGotLRUOrigin(const GURL& origin) { |
} |
quota_eviction_handler_->EvictOriginData(origin, kStorageTypeTemporary, |
- callback_factory_.NewCallback( |
- &QuotaTemporaryStorageEvictor::OnEvictionComplete)); |
+ base::Bind( |
+ &QuotaTemporaryStorageEvictor::OnEvictionComplete, |
+ weak_factory_.GetWeakPtr())); |
} |
void QuotaTemporaryStorageEvictor::OnEvictionComplete( |