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

Unified Diff: net/url_request/url_request_context_builder.cc

Issue 2143563002: net: Remove URLRequestContextBuilder::HttpCacheParams::Type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/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 02328d632a8cadbf6dfbd2b34d30c45fced90b42..fb48e27bec44d0e751e57380ded0c09fe9e93bce 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -172,9 +172,7 @@ class ContainerURLRequestContext : public URLRequestContext {
} // namespace
-URLRequestContextBuilder::HttpCacheParams::HttpCacheParams()
- : type(IN_MEMORY),
- max_size(0) {}
+URLRequestContextBuilder::HttpCacheParams::HttpCacheParams() : max_size(0) {}
URLRequestContextBuilder::HttpCacheParams::~HttpCacheParams() {}
URLRequestContextBuilder::HttpNetworkSessionParams::HttpNetworkSessionParams()
@@ -460,18 +458,8 @@ std::unique_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
std::unique_ptr<HttpTransactionFactory> http_transaction_factory;
if (http_cache_enabled_) {
std::unique_ptr<HttpCache::BackendFactory> http_cache_backend;
- 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, backend_type, http_cache_params_.path,
- http_cache_params_.max_size, context->GetFileTaskRunner()));
- } else {
- http_cache_backend =
- HttpCache::DefaultBackend::InMemory(http_cache_params_.max_size);
- }
+ http_cache_backend =
+ HttpCache::DefaultBackend::InMemory(http_cache_params_.max_size);
http_transaction_factory.reset(new HttpCache(
storage->http_network_session(), std::move(http_cache_backend), true));
« 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