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

Unified Diff: components/cronet/ios/test/start_cronet.mm

Issue 2836063005: [cronet] Add mechanism for restarting CronetEnvironment (Closed)
Patch Set: sync Created 3 years, 7 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/test/start_cronet.h ('k') | components/grpc_support/bidirectional_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/ios/test/start_cronet.mm
diff --git a/components/cronet/ios/test/start_cronet.mm b/components/cronet/ios/test/start_cronet.mm
index f7eee77187485b2455912793d66a685f8d367c76..6431ecf84ecdf31bc72bc5e47492ae748643f077 100644
--- a/components/cronet/ios/test/start_cronet.mm
+++ b/components/cronet/ios/test/start_cronet.mm
@@ -13,25 +13,22 @@
namespace cronet {
-void StartCronetIfNecessary(int port) {
- static bool initialized = false;
- if (!initialized) {
- initialized = true;
- [Cronet setUserAgent:@"CronetTest/1.0.0.0" partial:NO];
- [Cronet setHttp2Enabled:true];
- [Cronet setQuicEnabled:true];
- [Cronet setAcceptLanguages:@"en-US,en"];
- [Cronet
- setExperimentalOptions:
- [NSString
- stringWithFormat:@"{\"ssl_key_log_file\":\"%@\"}",
- [Cronet
- getNetLogPathForFile:@"SSLKEYLOGFILE"]]];
- [Cronet addQuicHint:@"test.example.com" port:443 altPort:443];
- [Cronet enableTestCertVerifierForTesting];
- [Cronet setHttpCacheType:CRNHttpCacheTypeDisabled];
- [Cronet start];
- }
+void StartCronet(int port) {
+ [Cronet setUserAgent:@"CronetTest/1.0.0.0" partial:NO];
+ [Cronet setHttp2Enabled:true];
+ [Cronet setQuicEnabled:true];
+ [Cronet setAcceptLanguages:@"en-US,en"];
+ [Cronet
+ setExperimentalOptions:
+ [NSString
+ stringWithFormat:@"{\"ssl_key_log_file\":\"%@\"}",
+ [Cronet getNetLogPathForFile:@"SSLKEYLOGFILE"]]];
+ [Cronet addQuicHint:@"test.example.com" port:443 altPort:443];
+ [Cronet enableTestCertVerifierForTesting];
+ [Cronet setHttpCacheType:CRNHttpCacheTypeDisabled];
+
+ [Cronet start];
+
NSString* rules = base::SysUTF8ToNSString(
base::StringPrintf("MAP test.example.com 127.0.0.1:%d,"
"MAP notfound.example.com ~NOTFOUND",
« no previous file with comments | « components/cronet/ios/test/start_cronet.h ('k') | components/grpc_support/bidirectional_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698