Index: content/browser/appcache/chrome_appcache_service.cc |
diff --git a/content/browser/appcache/chrome_appcache_service.cc b/content/browser/appcache/chrome_appcache_service.cc |
index dd593efdea1343aa50d5ad7b691f8e30195ca85a..dc9b7934b7be8ab92d65ef66398d0768a69241b7 100644 |
--- a/content/browser/appcache/chrome_appcache_service.cc |
+++ b/content/browser/appcache/chrome_appcache_service.cc |
@@ -14,33 +14,18 @@ |
static bool has_initialized_thread_ids; |
-namespace { |
- |
-// Used to defer deleting of local storage until the destructor has finished. |
-void DeleteLocalStateOnIOThread(FilePath cache_path) { |
- // Post the actual deletion to the DB thread to ensure it happens after the |
- // database file has been closed. |
- BrowserThread::PostTask( |
- BrowserThread::DB, FROM_HERE, |
- NewRunnableFunction<bool(*)(const FilePath&, bool), FilePath, bool>( |
- &file_util::Delete, cache_path, true)); |
-} |
- |
-} // namespace |
- |
// ---------------------------------------------------------------------------- |
ChromeAppCacheService::ChromeAppCacheService( |
quota::QuotaManagerProxy* quota_manager_proxy) |
: AppCacheService(quota_manager_proxy), |
- resource_context_(NULL), clear_local_state_on_exit_(false) { |
+ resource_context_(NULL) { |
} |
void ChromeAppCacheService::InitializeOnIOThread( |
const FilePath& cache_path, |
const content::ResourceContext* resource_context, |
- scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy, |
- bool clear_local_state_on_exit) { |
+ scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
if (!has_initialized_thread_ids) { |
@@ -53,7 +38,6 @@ void ChromeAppCacheService::InitializeOnIOThread( |
registrar_.Add( |
this, content::NOTIFICATION_PURGE_MEMORY, |
NotificationService::AllSources()); |
- SetClearLocalStateOnExit(clear_local_state_on_exit); |
// Init our base class. |
Initialize(cache_path_, |
@@ -63,26 +47,6 @@ void ChromeAppCacheService::InitializeOnIOThread( |
} |
ChromeAppCacheService::~ChromeAppCacheService() { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
- |
- if (clear_local_state_on_exit_ && !cache_path_.empty()) { |
- BrowserThread::PostTask( |
- BrowserThread::IO, FROM_HERE, |
- NewRunnableFunction(DeleteLocalStateOnIOThread, cache_path_)); |
- } |
-} |
- |
-void ChromeAppCacheService::SetClearLocalStateOnExit(bool clear_local_state) { |
- // TODO(michaeln): How is 'protected' status granted to apps in this case? |
- if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { |
- BrowserThread::PostTask( |
- BrowserThread::IO, FROM_HERE, |
- NewRunnableMethod(this, |
- &ChromeAppCacheService::SetClearLocalStateOnExit, |
- clear_local_state)); |
- return; |
- } |
- clear_local_state_on_exit_ = clear_local_state; |
} |
bool ChromeAppCacheService::CanLoadAppCache(const GURL& manifest_url) { |