Index: chrome/browser/browsing_data_remover.cc |
diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc |
index 8a2a8d069eb03097f7d9616e1a2e31d77b12e97f..45c5fcd678c99d8beab33d6255faa5d957e59f3d 100644 |
--- a/chrome/browser/browsing_data_remover.cc |
+++ b/chrome/browser/browsing_data_remover.cc |
@@ -73,8 +73,11 @@ BrowsingDataRemover::BrowsingDataRemover(Profile* profile, |
special_storage_policy_(profile->GetExtensionSpecialStoragePolicy()), |
delete_begin_(delete_begin), |
delete_end_(delete_end), |
- ALLOW_THIS_IN_INITIALIZER_LIST(cache_callback_( |
+ ALLOW_THIS_IN_INITIALIZER_LIST(old_cache_callback_( |
this, &BrowsingDataRemover::DoClearCache)), |
+ ALLOW_THIS_IN_INITIALIZER_LIST(cache_callback_( |
+ base::Bind(&BrowsingDataRemover::DoClearCache, |
+ base::Unretained(this)))), |
next_cache_state_(STATE_NONE), |
cache_(NULL), |
main_context_getter_(profile->GetRequestContext()), |
@@ -96,8 +99,11 @@ BrowsingDataRemover::BrowsingDataRemover(Profile* profile, |
special_storage_policy_(profile->GetExtensionSpecialStoragePolicy()), |
delete_begin_(CalculateBeginDeleteTime(time_period)), |
delete_end_(delete_end), |
- ALLOW_THIS_IN_INITIALIZER_LIST(cache_callback_( |
+ ALLOW_THIS_IN_INITIALIZER_LIST(old_cache_callback_( |
this, &BrowsingDataRemover::DoClearCache)), |
+ ALLOW_THIS_IN_INITIALIZER_LIST(cache_callback_( |
+ base::Bind(&BrowsingDataRemover::DoClearCache, |
+ base::Unretained(this)))), |
next_cache_state_(STATE_NONE), |
cache_(NULL), |
main_context_getter_(profile->GetRequestContext()), |
@@ -436,7 +442,7 @@ void BrowsingDataRemover::DoClearCache(int rv) { |
net::HttpTransactionFactory* factory = |
getter->GetURLRequestContext()->http_transaction_factory(); |
- rv = factory->GetCache()->GetBackend(&cache_, &cache_callback_); |
+ rv = factory->GetCache()->GetBackend(&cache_, cache_callback_); |
next_cache_state_ = (next_cache_state_ == STATE_CREATE_MAIN) ? |
STATE_DELETE_MAIN : STATE_DELETE_MEDIA; |
break; |
@@ -446,10 +452,10 @@ void BrowsingDataRemover::DoClearCache(int rv) { |
// |cache_| can be null if it cannot be initialized. |
if (cache_) { |
if (delete_begin_.is_null()) { |
- rv = cache_->DoomAllEntries(&cache_callback_); |
+ rv = cache_->DoomAllEntries(&old_cache_callback_); |
} else { |
rv = cache_->DoomEntriesBetween(delete_begin_, delete_end_, |
- &cache_callback_); |
+ &old_cache_callback_); |
} |
cache_ = NULL; |
} |