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

Side by Side Diff: components/cronet/ios/test/start_cronet.mm

Issue 2470923002: Revert "Revert of Moving gRPC support interfaces out of cronet and into a new component. (patchset … (Closed)
Patch Set: Address comments Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import <Cronet/Cronet.h>
6 #import <Foundation/Foundation.h>
7
8 #include "components/cronet/ios/test/start_cronet.h"
9
10 #include "base/strings/stringprintf.h"
11 #include "base/strings/sys_string_conversions.h"
12 #include "components/grpc_support/test/quic_test_server.h"
13
14 namespace cronet {
15
16 void StartCronetIfNecessary(int port) {
17 static bool initialized = false;
18 if (!initialized) {
19 initialized = true;
20 [Cronet setUserAgent:@"CronetTest/1.0.0.0" partial:NO];
21 [Cronet setHttp2Enabled:true];
22 [Cronet setQuicEnabled:true];
23 [Cronet setSslKeyLogFileName:@"SSLKEYLOGFILE"];
24 [Cronet addQuicHint:@"test.example.com" port:443 altPort:443];
25 [Cronet enableTestCertVerifierForTesting];
26 [Cronet start];
27 }
28 NSString* rules = base::SysUTF8ToNSString(
29 base::StringPrintf("MAP test.example.com 127.0.0.1:%d,"
30 "MAP notfound.example.com ~NOTFOUND",
31 port));
32 [Cronet setHostResolverRulesForTesting:rules];
33 }
34
35 } // namespace cronet
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698