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

Unified Diff: components/cronet/ios/cronet_environment.mm

Issue 2644583002: Add configuration functions for HTTP cache type to Obj-C and C++ (Closed)
Patch Set: make enum more obj-c-compatible Created 3 years, 11 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 | « components/cronet/ios/cronet_environment.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/ios/cronet_environment.mm
diff --git a/components/cronet/ios/cronet_environment.mm b/components/cronet/ios/cronet_environment.mm
index eb4137869c697ba73962e931db899bdeaeb898da..f8f794acf7e71b2f003290d269c50f32323beb1c 100644
--- a/components/cronet/ios/cronet_environment.mm
+++ b/components/cronet/ios/cronet_environment.mm
@@ -221,6 +221,7 @@ CronetEnvironment::CronetEnvironment(const std::string& user_agent,
bool user_agent_partial)
: http2_enabled_(false),
quic_enabled_(false),
+ http_cache_(URLRequestContextConfig::HttpCacheType::DISK),
user_agent_(user_agent),
user_agent_partial_(user_agent_partial),
net_log_(new net::NetLog) {}
@@ -287,7 +288,7 @@ void CronetEnvironment::InitializeOnNetworkThread() {
URLRequestContextConfigBuilder context_config_builder;
context_config_builder.enable_quic = quic_enabled_; // Enable QUIC.
context_config_builder.enable_spdy = http2_enabled_; // Enable HTTP/2.
- context_config_builder.http_cache = URLRequestContextConfig::DISK;
+ context_config_builder.http_cache = http_cache_; // Set HTTP cache
context_config_builder.storage_path =
cache_path.value(); // Storage path for http cache and cookie storage.
context_config_builder.user_agent =
« no previous file with comments | « components/cronet/ios/cronet_environment.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698