Chromium Code Reviews| Index: components/cronet/ios/Cronet.mm |
| diff --git a/components/cronet/ios/Cronet.mm b/components/cronet/ios/Cronet.mm |
| index 09b3c53b60f21dd13b510ea559f75abd1f0ecb15..19ecd0d76ea88a55911cc779064fdc53df78df63 100644 |
| --- a/components/cronet/ios/Cronet.mm |
| +++ b/components/cronet/ios/Cronet.mm |
| @@ -33,6 +33,7 @@ base::LazyInstance<std::unique_ptr<cronet::CronetEnvironment>>::Leaky |
| BOOL gHttp2Enabled = YES; |
| BOOL gQuicEnabled = NO; |
| +HttpCacheType gHttpCache = HttpCacheType::DISK; |
| ScopedVector<cronet::URLRequestContextConfig::QuicHint> gQuicHints; |
| NSString* gUserAgent = nil; |
| BOOL gUserAgentPartial = NO; |
| @@ -159,6 +160,11 @@ class CronetHttpProtocolHandlerDelegate |
| gSslKeyLogFileName = sslKeyLogFileName; |
| } |
| ++ (void)setHttpCacheType:(HttpCacheType)httpCache { |
| + [self checkNotStarted]; |
| + gHttpCache = httpCache; |
|
mef
2017/01/18 22:39:51
I think this is a good place to map from ObjC to H
lilyhoughton
2017/01/19 16:17:15
Done; there may be a more robust way to map the Ob
|
| +} |
| + |
| + (void)setRequestFilterBlock:(RequestFilterBlock)block { |
| if (gHttpProtocolHandlerDelegate.get()) |
| gHttpProtocolHandlerDelegate.get()->SetRequestFilterBlock(block); |
| @@ -176,6 +182,7 @@ class CronetHttpProtocolHandlerDelegate |
| gChromeNet.Get()->set_http2_enabled(gHttp2Enabled); |
| gChromeNet.Get()->set_quic_enabled(gQuicEnabled); |
| + gChromeNet.Get()->set_http_cache(gHttpCache); |
| gChromeNet.Get()->set_ssl_key_log_file_name( |
| base::SysNSStringToUTF8(gSslKeyLogFileName)); |
| for (const auto* quicHint : gQuicHints) { |