Chromium Code Reviews| Index: chrome/browser/browsing_data_remover.cc |
| diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc |
| index b572cd42805d1b0c225835c2655ba3a16ebbaa79..3133c8ddb231bf8135ef63aebad653cee32b5dda 100644 |
| --- a/chrome/browser/browsing_data_remover.cc |
| +++ b/chrome/browser/browsing_data_remover.cc |
| @@ -66,7 +66,6 @@ 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_( |
| @@ -225,12 +224,15 @@ void BrowsingDataRemover::Remove(int remove_mask) { |
| &BrowsingDataRemover::ClearDatabasesOnFILEThread)); |
| } |
| - waiting_for_clear_appcache_ = true; |
| - BrowserThread::PostTask( |
| - BrowserThread::IO, FROM_HERE, |
| - NewRunnableMethod( |
| - this, |
| - &BrowsingDataRemover::ClearAppCacheOnIOThread)); |
| + appcache_service_ = profile_->GetAppCacheService(); |
|
jochen (gone - plz use gerrit)
2011/07/06 09:44:16
why did you move this out of the initilization lis
marja(google)
2011/07/06 10:29:38
Like the database_tracker_ above. Remove() will be
jochen (gone - plz use gerrit)
2011/07/06 10:39:45
ok
|
| + if (appcache_service_.get()) { |
| + waiting_for_clear_appcache_ = true; |
| + BrowserThread::PostTask( |
| + BrowserThread::IO, FROM_HERE, |
| + NewRunnableMethod( |
| + this, |
| + &BrowsingDataRemover::ClearAppCacheOnIOThread)); |
| + } |
| waiting_for_clear_gears_data_ = true; |
| BrowserThread::PostTask( |
| @@ -527,14 +529,9 @@ void BrowsingDataRemover::ClearAppCacheOnIOThread() { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| DCHECK(waiting_for_clear_appcache_); |
| appcache_info_ = new appcache::AppCacheInfoCollection; |
| - if (appcache_service_) { |
| - appcache_service_->GetAllAppCacheInfo( |
| - appcache_info_, &appcache_got_info_callback_); |
| - // continues in OnGotAppCacheInfo |
| - } else { |
| - // Couldn't get app cache service, nothing to clear. |
| - OnClearedAppCache(); |
| - } |
| + appcache_service_->GetAllAppCacheInfo( |
| + appcache_info_, &appcache_got_info_callback_); |
|
jochen (gone - plz use gerrit)
2011/07/06 09:44:16
four spaces indenting
marja(google)
2011/07/06 10:29:38
Fixed.
|
| + // continues in OnGotAppCacheInfo |
|
jochen (gone - plz use gerrit)
2011/07/06 09:44:16
. at end of comment
marja(google)
2011/07/06 10:29:38
Fixed.
|
| } |
| void BrowsingDataRemover::OnGotAppCacheInfo(int rv) { |