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

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

Issue 2836063005: [cronet] Add mechanism for restarting CronetEnvironment (Closed)
Patch Set: per #21 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <Cronet/Cronet.h> 5 #import <Cronet/Cronet.h>
6 #import <Foundation/Foundation.h> 6 #import <Foundation/Foundation.h>
7 7
8 #include "components/cronet/ios/test/start_cronet.h" 8 #include "components/cronet/ios/test/start_cronet.h"
9 #include "components/grpc_support/test/get_stream_engine.h" 9 #include "components/grpc_support/test/get_stream_engine.h"
10 10
11 @interface Cronet (ExposedForTesting)
12 + (void)shutdownForTesting;
13 @end
14
11 namespace grpc_support { 15 namespace grpc_support {
12 16
13 stream_engine* GetTestStreamEngine(int port) { 17 stream_engine* GetTestStreamEngine(int port) {
14 cronet::StartCronetIfNecessary(port);
15 return [Cronet getGlobalEngine]; 18 return [Cronet getGlobalEngine];
16 } 19 }
17 20
21 void StartTestStreamEngine(int port) {
22 cronet::StartCronet(port);
23 }
24
25 void ShutdownTestStreamEngine() {
26 [Cronet shutdownForTesting];
27 }
28
18 } // namespace grpc_support 29 } // namespace grpc_support
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698