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

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

Issue 2760073002: [cronet] Expose API to set experimental options (Closed)
Patch Set: sync Created 3 years, 8 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.h ('k') | components/cronet/ios/cronet_environment.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/ios/Cronet.mm
diff --git a/components/cronet/ios/Cronet.mm b/components/cronet/ios/Cronet.mm
index b883049b52d3fefab00ba5ac7b4ec128cc676e90..3adc49185c673fdef413d8f2095b183c75982316 100644
--- a/components/cronet/ios/Cronet.mm
+++ b/components/cronet/ios/Cronet.mm
@@ -37,6 +37,7 @@ BOOL gQuicEnabled = NO;
cronet::URLRequestContextConfig::HttpCacheType gHttpCache =
cronet::URLRequestContextConfig::HttpCacheType::DISK;
ScopedVector<cronet::URLRequestContextConfig::QuicHint> gQuicHints;
+NSString* gExperimentalOptions = @"{}";
NSString* gUserAgent = nil;
BOOL gUserAgentPartial = NO;
NSString* gSslKeyLogFileName = nil;
@@ -168,6 +169,11 @@ class CronetHttpProtocolHandlerDelegate
base::SysNSStringToUTF8(host), port, altPort));
}
++ (void)setExperimentalOptions:(NSString*)experimentalOptions {
+ [self checkNotStarted];
+ gExperimentalOptions = experimentalOptions;
+}
+
+ (void)setUserAgent:(NSString*)userAgent partial:(BOOL)partial {
[self checkNotStarted];
gUserAgent = userAgent;
@@ -176,7 +182,7 @@ class CronetHttpProtocolHandlerDelegate
+ (void)setSslKeyLogFileName:(NSString*)sslKeyLogFileName {
[self checkNotStarted];
- gSslKeyLogFileName = sslKeyLogFileName;
+ gSslKeyLogFileName = [self getNetLogPathForFile:sslKeyLogFileName];
}
+ (void)setHttpCacheType:(CRNHttpCacheType)httpCacheType {
@@ -213,6 +219,8 @@ class CronetHttpProtocolHandlerDelegate
gChromeNet.Get()->set_http2_enabled(gHttp2Enabled);
gChromeNet.Get()->set_quic_enabled(gQuicEnabled);
+ gChromeNet.Get()->set_experimental_options(
+ base::SysNSStringToUTF8(gExperimentalOptions));
gChromeNet.Get()->set_http_cache(gHttpCache);
gChromeNet.Get()->set_ssl_key_log_file_name(
base::SysNSStringToUTF8(gSslKeyLogFileName));
« no previous file with comments | « components/cronet/ios/Cronet.h ('k') | components/cronet/ios/cronet_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698