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

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

Issue 2836063005: [cronet] Add mechanism for restarting CronetEnvironment (Closed)
Patch Set: close parenthesis 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/get_stream_engine.mm
diff --git a/components/cronet/ios/test/get_stream_engine.mm b/components/cronet/ios/test/get_stream_engine.mm
index f73f1c9a232266d112de42549250f2fb417e0b75..6e20db70782e8f46e4acfca17247854e7c93e9c0 100644
--- a/components/cronet/ios/test/get_stream_engine.mm
+++ b/components/cronet/ios/test/get_stream_engine.mm
@@ -8,11 +8,22 @@
#include "components/cronet/ios/test/start_cronet.h"
#include "components/grpc_support/test/get_stream_engine.h"
+@interface Cronet (ExposedForTesting)
++ (void)shutdownForTesting;
+@end
+
namespace grpc_support {
stream_engine* GetTestStreamEngine(int port) {
- cronet::StartCronetIfNecessary(port);
return [Cronet getGlobalEngine];
}
+void StartTestStreamEngine(int port) {
+ cronet::StartCronet(port);
+}
+
+void ShutdownTestStreamEngine() {
+ [Cronet shutdownForTesting];
+}
+
} // namespace grpc_support

Powered by Google App Engine
This is Rietveld 408576698