diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-07 22:42:01 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-07 22:42:01 +0000 |
commit | f5ad47a18ebe1dfe2656588776557c3a702faf56 (patch) | |
tree | 75e5599ad5d40d9972cf8ae8973df9a9853b316a /webkit/appcache/appcache_storage_impl.cc | |
parent | ce940f01fdcd216b90e5005f840d3df5d19190cd (diff) | |
download | chromium_src-f5ad47a18ebe1dfe2656588776557c3a702faf56.zip chromium_src-f5ad47a18ebe1dfe2656588776557c3a702faf56.tar.gz chromium_src-f5ad47a18ebe1dfe2656588776557c3a702faf56.tar.bz2 |
AppCache: Use a dedicated thread for the disk cache.
BUG=26730
TEST=current tests
Review URL: http://codereview.chromium.org/2249005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49111 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_storage_impl.cc')
-rw-r--r-- | webkit/appcache/appcache_storage_impl.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/webkit/appcache/appcache_storage_impl.cc b/webkit/appcache/appcache_storage_impl.cc index 051d276..b853a0c 100644 --- a/webkit/appcache/appcache_storage_impl.cc +++ b/webkit/appcache/appcache_storage_impl.cc @@ -844,8 +844,10 @@ AppCacheStorageImpl::~AppCacheStorageImpl() { AppCacheThread::DeleteSoon(AppCacheThread::db(), FROM_HERE, database_); } -void AppCacheStorageImpl::Initialize(const FilePath& cache_directory) { +void AppCacheStorageImpl::Initialize(const FilePath& cache_directory, + base::MessageLoopProxy* cache_thread) { cache_directory_ = cache_directory; + cache_thread_ = cache_thread; is_incognito_ = cache_directory_.empty(); FilePath db_file_path; @@ -1273,9 +1275,12 @@ AppCacheDiskCache* AppCacheStorageImpl::disk_cache() { } else { rv = disk_cache_->InitWithDiskBackend( cache_directory_.Append(kDiskCacheDirectoryName), - kMaxDiskCacheSize, false, &init_callback_); + kMaxDiskCacheSize, false, cache_thread_, &init_callback_); } + // We should not keep this reference around. + cache_thread_ = NULL; + if (rv != net::ERR_IO_PENDING) OnDiskCacheInitialized(rv); } |