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

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

Issue 2836063005: [cronet] Add mechanism for restarting CronetEnvironment (Closed)
Patch Set: per #5 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
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 ca3a8998edfa2c48100f3ea4c35087c34c634767..fb71a09ef73022bd73a88496a7774a14b7ff9729 100644
--- a/components/cronet/ios/test/start_cronet.mm
+++ b/components/cronet/ios/test/start_cronet.mm
@@ -13,20 +13,17 @@
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 setSslKeyLogFileName:@"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 setSslKeyLogFileName:@"SSLKEYLOGFILE"];
+ [Cronet addQuicHint:@"test.example.com" port:443 altPort:443];
+ [Cronet enableTestCertVerifierForTesting];
+
+ [Cronet start];
+
NSString* rules = base::SysUTF8ToNSString(
base::StringPrintf("MAP test.example.com 127.0.0.1:%d,"
"MAP notfound.example.com ~NOTFOUND",

Powered by Google App Engine
This is Rietveld 408576698