Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5212)

Unified Diff: chrome/browser/browsing_data_appcache_helper.cc

Issue 8776024: base::Bind: Convert AppCacheService::GetAllAppCacheInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browsing_data_appcache_helper.h ('k') | webkit/appcache/appcache_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data_appcache_helper.cc
diff --git a/chrome/browser/browsing_data_appcache_helper.cc b/chrome/browser/browsing_data_appcache_helper.cc
index b30fbb44675fe8b13756c28f244d19225c193bd5..4d4febf63a16c300bc90b5248df8ccd3d0beefb7 100644
--- a/chrome/browser/browsing_data_appcache_helper.cc
+++ b/chrome/browser/browsing_data_appcache_helper.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/browsing_data_appcache_helper.h"
#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "chrome/browser/net/chrome_url_request_context.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/url_constants.h"
@@ -34,11 +35,11 @@ void BrowsingDataAppCacheHelper::StartFetching(const base::Closure& callback) {
}
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- appcache_info_callback_ =
- new net::CancelableOldCompletionCallback<BrowsingDataAppCacheHelper>(
- this, &BrowsingDataAppCacheHelper::OnFetchComplete);
+ appcache_info_callback_.Reset(
+ base::Bind(&BrowsingDataAppCacheHelper::OnFetchComplete,
+ base::Unretained(this)));
appcache_service_->GetAllAppCacheInfo(info_collection_,
- appcache_info_callback_);
+ appcache_info_callback_.callback());
}
void BrowsingDataAppCacheHelper::CancelNotification() {
@@ -50,8 +51,7 @@ void BrowsingDataAppCacheHelper::CancelNotification() {
return;
}
- if (appcache_info_callback_)
- appcache_info_callback_.release()->Cancel();
+ appcache_info_callback_.Cancel();
}
void BrowsingDataAppCacheHelper::DeleteAppCacheGroup(
@@ -82,7 +82,6 @@ void BrowsingDataAppCacheHelper::OnFetchComplete(int rv) {
origin_map.erase(current);
}
- appcache_info_callback_ = NULL;
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&BrowsingDataAppCacheHelper::OnFetchComplete, this, rv));
« no previous file with comments | « chrome/browser/browsing_data_appcache_helper.h ('k') | webkit/appcache/appcache_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698