diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-29 19:14:29 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-29 19:14:29 +0000 |
commit | e7b60a742d466731f93ace36be1de2ca966d4457 (patch) | |
tree | 013a8f0a8d586e2d151e127c280cb433a2f9d4ad /net/http/http_cache.cc | |
parent | 97e1958e5fdacf588ba0588729379749569d5ec1 (diff) | |
download | chromium_src-e7b60a742d466731f93ace36be1de2ca966d4457.zip chromium_src-e7b60a742d466731f93ace36be1de2ca966d4457.tar.gz chromium_src-e7b60a742d466731f93ace36be1de2ca966d4457.tar.bz2 |
Http cache: Add support for a dedicated cache thread.
This is an interface-only change, nothing is really moving to another thread yet.
BUG=26730
TEST=none
Review URL: http://codereview.chromium.org/983007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45974 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_cache.cc')
-rw-r--r-- | net/http/http_cache.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc index 2cb4fa1..7c433a9 100644 --- a/net/http/http_cache.cc +++ b/net/http/http_cache.cc @@ -201,8 +201,10 @@ HttpCache::HttpCache(NetworkChangeNotifier* network_change_notifier, 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(NetworkChangeNotifier* network_change_notifier, 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 @@ disk_cache::Backend* HttpCache::GetBackend() { 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(); |