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

Side by Side Diff: components/cronet/ios/Cronet.h

Issue 2487863003: Revert of Revert "Revert of Moving gRPC support interfaces out of cronet and into a new component. (patchset … (Closed)
Patch Set: 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/BUILD.gn ('k') | components/cronet/ios/Cronet.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <Foundation/Foundation.h> 5 #import <Foundation/Foundation.h>
6 6
7 #include "bidirectional_stream_c.h" 7 #include "cronet_c_for_grpc.h"
8 8
9 // A block, that takes a request, and returns YES if the request should 9 // A block, that takes a request, and returns YES if the request should
10 // be handled. 10 // be handled.
11 typedef BOOL (^RequestFilterBlock)(NSURLRequest* request); 11 typedef BOOL (^RequestFilterBlock)(NSURLRequest* request);
12 12
13 // Interface for installing Cronet. 13 // Interface for installing Cronet.
14 // TODO(gcasto): Should this macro be separate from the one defined in 14 CRONET_EXPORT
15 // bidirectional_stream_c.h?
16 GRPC_SUPPORT_EXPORT
17 @interface Cronet : NSObject 15 @interface Cronet : NSObject
18 16
19 // Sets whether HTTP/2 should be supported by CronetEngine. This method only has 17 // Sets whether HTTP/2 should be supported by CronetEngine. This method only has
20 // any effect before |start| is called. 18 // any effect before |start| is called.
21 + (void)setHttp2Enabled:(BOOL)http2Enabled; 19 + (void)setHttp2Enabled:(BOOL)http2Enabled;
22 20
23 // Sets whether QUIC should be supported by CronetEngine. This method only has 21 // Sets whether QUIC should be supported by CronetEngine. This method only has
24 // any effect before |start| is called. 22 // any effect before |start| is called.
25 + (void)setQuicEnabled:(BOOL)quicEnabled; 23 + (void)setQuicEnabled:(BOOL)quicEnabled;
26 24
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 82
85 // Stop net-internals logging and flush file to disk. If a logging session is 83 // Stop net-internals logging and flush file to disk. If a logging session is
86 // not in progress this call is ignored. 84 // not in progress this call is ignored.
87 + (void)stopNetLog; 85 + (void)stopNetLog;
88 86
89 // Returns the full user-agent that the stack uses. 87 // Returns the full user-agent that the stack uses.
90 // This is the exact string servers will see. 88 // This is the exact string servers will see.
91 + (NSString*)getUserAgent; 89 + (NSString*)getUserAgent;
92 90
93 // Get a pointer to global instance of cronet_engine for GRPC C API. 91 // Get a pointer to global instance of cronet_engine for GRPC C API.
94 + (stream_engine*)getGlobalEngine; 92 + (cronet_engine*)getGlobalEngine;
95 93
96 // Returns differences in metrics collected by Cronet since the last call to 94 // Returns differences in metrics collected by Cronet since the last call to
97 // getGlobalMetricsDeltas, serialized as a [protobuf] 95 // getGlobalMetricsDeltas, serialized as a [protobuf]
98 // (https://developers.google.com/protocol-buffers). 96 // (https://developers.google.com/protocol-buffers).
99 // 97 //
100 // Cronet starts collecting these metrics after the first call to 98 // Cronet starts collecting these metrics after the first call to
101 // getGlobalMetricsDeltras, so the first call returns no 99 // getGlobalMetricsDeltras, so the first call returns no
102 // useful data as no metrics have yet been collected. 100 // useful data as no metrics have yet been collected.
103 + (NSData*)getGlobalMetricsDeltas; 101 + (NSData*)getGlobalMetricsDeltas;
104 102
105 // Sets Host Resolver Rules for testing. 103 // Sets Host Resolver Rules for testing.
106 // This method must be called after |start| has been called. 104 // This method only has any effect before |start| is called.
107 + (void)setHostResolverRulesForTesting:(NSString*)hostResolverRulesForTesting; 105 + (void)setHostResolverRulesForTesting:(NSString*)hostResolverRulesForTesting;
108 106
109 // Enables TestCertVerifier which accepts all certificates for testing. 107 // Enables TestCertVerifier which accepts all certificates for testing.
110 // This method only has any effect before |start| is called. 108 // This method only has any effect before |start| is called.
111 + (void)enableTestCertVerifierForTesting; 109 + (void)enableTestCertVerifierForTesting;
112 110
113 @end 111 @end
OLDNEW
« no previous file with comments | « components/cronet/ios/BUILD.gn ('k') | components/cronet/ios/Cronet.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698