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

Unified Diff: net/url_request/url_request_context_builder.cc

Issue 1448193002: [Android WebView] Get rid of secondary HttpNetworkSession (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use the right HttpNetworkSessionParams type Created 5 years, 1 month 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/url_request/url_request_context_builder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_context_builder.cc
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
index a7beaa8313d9556eea6d0cff924b2ec436c45e99..c7535074b9f11b49c839cc2aee92390e353326ef 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -398,9 +398,13 @@ scoped_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
scoped_ptr<HttpTransactionFactory> http_transaction_factory;
if (http_cache_enabled_) {
scoped_ptr<HttpCache::BackendFactory> http_cache_backend;
- if (http_cache_params_.type == HttpCacheParams::DISK) {
+ if (http_cache_params_.type != HttpCacheParams::IN_MEMORY) {
+ BackendType backend_type =
+ http_cache_params_.type == HttpCacheParams::DISK
+ ? CACHE_BACKEND_DEFAULT
+ : CACHE_BACKEND_SIMPLE;
http_cache_backend.reset(new HttpCache::DefaultBackend(
- DISK_CACHE, CACHE_BACKEND_DEFAULT, http_cache_params_.path,
+ DISK_CACHE, backend_type, http_cache_params_.path,
http_cache_params_.max_size, context->GetFileTaskRunner()));
} else {
http_cache_backend =
« no previous file with comments | « net/url_request/url_request_context_builder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698