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

Unified Diff: webkit/appcache/appcache_storage_impl.cc

Issue 2249005: AppCache: Use a dedicated thread for the disk cache. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Bound to IO thread Created 10 years, 7 months 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 | « webkit/appcache/appcache_storage_impl.h ('k') | webkit/appcache/appcache_storage_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache_storage_impl.cc
===================================================================
--- webkit/appcache/appcache_storage_impl.cc (revision 48989)
+++ webkit/appcache/appcache_storage_impl.cc (working copy)
@@ -844,8 +844,10 @@
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 @@
} 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);
}
« no previous file with comments | « webkit/appcache/appcache_storage_impl.h ('k') | webkit/appcache/appcache_storage_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698