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

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

Issue 2273403003: Moving gRPC support interfaces out of cronet and into a new component. (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
« no previous file with comments | « components/cronet/ios/test/start_cronet.h ('k') | components/grpc_support/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/at_exit.h"
11 #include "components/grpc_support/test/quic_test_server.h"
12
13 namespace cronet {
14
15 base::AtExitManager* g_at_exit_ = nullptr;
16
17 void StartCronetIfNecessary() {
18 static bool initialized = false;
19 if (!initialized) {
20 initialized = true;
21 [Cronet setUserAgent:@"CronetTest/1.0.0.0" partial:NO];
22 [Cronet setHttp2Enabled:true];
23 [Cronet setQuicEnabled:true];
24 [Cronet setSslKeyLogFileName:@"SSLKEYLOGFILE"];
25 [Cronet addQuicHint:@"test.example.com"
26 port:grpc_support::kTestServerPort
27 altPort:grpc_support::kTestServerPort];
28 [Cronet enableTestCertVerifierForTesting];
29 [Cronet
30 setHostResolverRulesForTesting:@"MAP test.example.com 127.0.0.1,"
31 "MAP notfound.example.com ~NOTFOUND"];
32 [Cronet start];
33
34 // This method must be called once from the main thread.
35 if (!g_at_exit_)
36 g_at_exit_ = new base::AtExitManager;
37 }
38 }
39
40 } // namespace cronet
OLDNEW
« no previous file with comments | « components/cronet/ios/test/start_cronet.h ('k') | components/grpc_support/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698