diff options
Diffstat (limited to 'WebKit/android/WebCoreSupport/WebRequestContext.cpp')
-rw-r--r-- | WebKit/android/WebCoreSupport/WebRequestContext.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/WebKit/android/WebCoreSupport/WebRequestContext.cpp b/WebKit/android/WebCoreSupport/WebRequestContext.cpp index dc9feae..0dda816 100644 --- a/WebKit/android/WebCoreSupport/WebRequestContext.cpp +++ b/WebKit/android/WebCoreSupport/WebRequestContext.cpp @@ -28,6 +28,7 @@ #include "WebRequestContext.h" #include "JNIUtility.h" +#include "WebUrlLoaderClient.h" #include "jni.h" #include <dirent.h> #include <sys/types.h> @@ -121,7 +122,8 @@ scoped_refptr<WebRequestContext> WebRequestContext::GetAndroidContextForPath(con scoped_refptr<WebRequestContext> androidContext = new WebRequestContext(); androidContext->host_resolver_ = net::CreateSystemHostResolver(0); - scoped_refptr<base::MessageLoopProxy> cacheMessageLoopProxy = base::MessageLoopProxy::CreateForCurrentThread(); + base::Thread* ioThread = WebUrlLoaderClient::ioThread(); + scoped_refptr<base::MessageLoopProxy> cacheMessageLoopProxy = ioThread->message_loop_proxy(); // Todo: check if the context takes ownership of the cache net::HttpCache::DefaultBackend* defaultBackend = new net::HttpCache::DefaultBackend(net::DISK_CACHE, cachePath, 20 * 1024 * 1024, cacheMessageLoopProxy); androidContext->http_transaction_factory_ = new net::HttpCache(androidContext->host_resolver(), net::ProxyService::CreateNull(), net::SSLConfigService::CreateSystemSSLConfigService(), net::HttpAuthHandlerFactory::CreateDefault(), 0, 0, defaultBackend); |