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

Unified Diff: net/http/http_cache.cc

Issue 983007: Http cache: Add support for a dedicated cache thread. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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 | « net/http/http_cache.h ('k') | webkit/appcache/appcache_disk_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache.cc
===================================================================
--- net/http/http_cache.cc (revision 45869)
+++ net/http/http_cache.cc (working copy)
@@ -201,8 +201,10 @@
SSLConfigService* ssl_config_service,
HttpAuthHandlerFactory* http_auth_handler_factory,
const FilePath& cache_dir,
+ MessageLoop* cache_thread,
int cache_size)
: disk_cache_dir_(cache_dir),
+ cache_thread_(cache_thread),
mode_(NORMAL),
type_(DISK_CACHE),
network_layer_(HttpNetworkLayer::CreateFactory(
@@ -215,8 +217,10 @@
HttpCache::HttpCache(HttpNetworkSession* session,
const FilePath& cache_dir,
+ MessageLoop* cache_thread,
int cache_size)
: disk_cache_dir_(cache_dir),
+ cache_thread_(cache_thread),
mode_(NORMAL),
type_(DISK_CACHE),
network_layer_(HttpNetworkLayer::CreateFactory(session)),
@@ -289,6 +293,13 @@
return disk_cache_.get();
}
+int HttpCache::GetBackend(disk_cache::Backend** backend,
+ CompletionCallback* callback) {
+ DCHECK(callback != NULL);
+ *backend = GetBackend();
+ return OK;
+}
+
int HttpCache::CreateTransaction(scoped_ptr<HttpTransaction>* trans) {
// Do lazy initialization of disk cache if needed.
GetBackend();
« no previous file with comments | « net/http/http_cache.h ('k') | webkit/appcache/appcache_disk_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698