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

Unified Diff: webkit/tools/test_shell/test_shell_request_context.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
Index: webkit/tools/test_shell/test_shell_request_context.cc
===================================================================
--- webkit/tools/test_shell/test_shell_request_context.cc (revision 48989)
+++ webkit/tools/test_shell/test_shell_request_context.cc (working copy)
@@ -17,15 +17,16 @@
#include "net/proxy/proxy_config_service_fixed.h"
#include "net/proxy/proxy_service.h"
#include "webkit/glue/webkit_glue.h"
+#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
-TestShellRequestContext::TestShellRequestContext() : cache_thread_("cache") {
+TestShellRequestContext::TestShellRequestContext() {
Init(FilePath(), net::HttpCache::NORMAL, false);
}
TestShellRequestContext::TestShellRequestContext(
const FilePath& cache_path,
net::HttpCache::Mode cache_mode,
- bool no_proxy) : cache_thread_("cache") {
+ bool no_proxy) {
Init(cache_path, cache_mode, no_proxy);
}
@@ -63,13 +64,9 @@
http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault();
- if (!cache_path.empty())
- CHECK(cache_thread_.StartWithOptions(
- base::Thread::Options(MessageLoop::TYPE_IO, 0)));
-
net::HttpCache::DefaultBackend* backend = new net::HttpCache::DefaultBackend(
cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE,
- cache_path, 0, cache_thread_.message_loop_proxy());
+ cache_path, 0, SimpleResourceLoaderBridge::GetCacheThread());
net::HttpCache* cache =
new net::HttpCache(NULL, host_resolver_, proxy_service_,
« no previous file with comments | « webkit/tools/test_shell/test_shell_request_context.h ('k') | webkit/tools/test_shell/test_shell_webkit_init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698