| Index: chrome/browser/browsing_data_remover.cc
|
| diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc
|
| index 9a42c40116478c6508d3faeebcaf056de881a0ca..b572cd42805d1b0c225835c2655ba3a16ebbaa79 100644
|
| --- a/chrome/browser/browsing_data_remover.cc
|
| +++ b/chrome/browser/browsing_data_remover.cc
|
| @@ -66,6 +66,7 @@ BrowsingDataRemover::BrowsingDataRemover(Profile* profile,
|
| this, &BrowsingDataRemover::OnClearedDatabases)),
|
| ALLOW_THIS_IN_INITIALIZER_LIST(cache_callback_(
|
| this, &BrowsingDataRemover::DoClearCache)),
|
| + appcache_service_(profile->GetAppCacheService()),
|
| ALLOW_THIS_IN_INITIALIZER_LIST(appcache_got_info_callback_(
|
| this, &BrowsingDataRemover::OnGotAppCacheInfo)),
|
| ALLOW_THIS_IN_INITIALIZER_LIST(appcache_deleted_callback_(
|
| @@ -526,8 +527,8 @@ void BrowsingDataRemover::ClearAppCacheOnIOThread() {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| DCHECK(waiting_for_clear_appcache_);
|
| appcache_info_ = new appcache::AppCacheInfoCollection;
|
| - if (GetAppCacheService()) {
|
| - GetAppCacheService()->GetAllAppCacheInfo(
|
| + if (appcache_service_) {
|
| + appcache_service_->GetAllAppCacheInfo(
|
| appcache_info_, &appcache_got_info_callback_);
|
| // continues in OnGotAppCacheInfo
|
| } else {
|
| @@ -549,7 +550,7 @@ void BrowsingDataRemover::OnGotAppCacheInfo(int rv) {
|
| info != origin->second.end(); ++info) {
|
| if (info->creation_time > delete_begin_) {
|
| ++appcaches_to_be_deleted_count_;
|
| - GetAppCacheService()->DeleteAppCacheGroup(
|
| + appcache_service_->DeleteAppCacheGroup(
|
| info->manifest_url, &appcache_deleted_callback_);
|
| }
|
| }
|
| @@ -566,16 +567,6 @@ void BrowsingDataRemover::OnAppCacheDeleted(int rv) {
|
| OnClearedAppCache();
|
| }
|
|
|
| -ChromeAppCacheService* BrowsingDataRemover::GetAppCacheService() {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| - ChromeURLRequestContext* request_context = NULL;
|
| - if (main_context_getter_)
|
| - request_context = reinterpret_cast<ChromeURLRequestContext*>(
|
| - main_context_getter_->GetURLRequestContext());
|
| - return request_context ? request_context->appcache_service()
|
| - : NULL;
|
| -}
|
| -
|
| void BrowsingDataRemover::ClearFileSystemsOnFILEThread() {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
|
| DCHECK(waiting_for_clear_file_systems_);
|
|
|