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

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

Issue 2492703002: Third try at landing gRPC refactoring. Previous issue failed on the waterfall (Closed)
Patch Set: Change DCHECK 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 "cronet_c_for_grpc.h" 7 #include "bidirectional_stream_c.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 CRONET_EXPORT 14 // TODO(gcasto): Should this macro be separate from the one defined in
15 // bidirectional_stream_c.h?
16 GRPC_SUPPORT_EXPORT
15 @interface Cronet : NSObject 17 @interface Cronet : NSObject
16 18
17 // Sets whether HTTP/2 should be supported by CronetEngine. This method only has 19 // Sets whether HTTP/2 should be supported by CronetEngine. This method only has
18 // any effect before |start| is called. 20 // any effect before |start| is called.
19 + (void)setHttp2Enabled:(BOOL)http2Enabled; 21 + (void)setHttp2Enabled:(BOOL)http2Enabled;
20 22
21 // Sets whether QUIC should be supported by CronetEngine. This method only has 23 // Sets whether QUIC should be supported by CronetEngine. This method only has
22 // any effect before |start| is called. 24 // any effect before |start| is called.
23 + (void)setQuicEnabled:(BOOL)quicEnabled; 25 + (void)setQuicEnabled:(BOOL)quicEnabled;
24 26
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 84
83 // Stop net-internals logging and flush file to disk. If a logging session is 85 // Stop net-internals logging and flush file to disk. If a logging session is
84 // not in progress this call is ignored. 86 // not in progress this call is ignored.
85 + (void)stopNetLog; 87 + (void)stopNetLog;
86 88
87 // Returns the full user-agent that the stack uses. 89 // Returns the full user-agent that the stack uses.
88 // This is the exact string servers will see. 90 // This is the exact string servers will see.
89 + (NSString*)getUserAgent; 91 + (NSString*)getUserAgent;
90 92
91 // Get a pointer to global instance of cronet_engine for GRPC C API. 93 // Get a pointer to global instance of cronet_engine for GRPC C API.
92 + (cronet_engine*)getGlobalEngine; 94 + (stream_engine*)getGlobalEngine;
93 95
94 // Returns differences in metrics collected by Cronet since the last call to 96 // Returns differences in metrics collected by Cronet since the last call to
95 // getGlobalMetricsDeltas, serialized as a [protobuf] 97 // getGlobalMetricsDeltas, serialized as a [protobuf]
96 // (https://developers.google.com/protocol-buffers). 98 // (https://developers.google.com/protocol-buffers).
97 // 99 //
98 // Cronet starts collecting these metrics after the first call to 100 // Cronet starts collecting these metrics after the first call to
99 // getGlobalMetricsDeltras, so the first call returns no 101 // getGlobalMetricsDeltras, so the first call returns no
100 // useful data as no metrics have yet been collected. 102 // useful data as no metrics have yet been collected.
101 + (NSData*)getGlobalMetricsDeltas; 103 + (NSData*)getGlobalMetricsDeltas;
102 104
103 // Sets Host Resolver Rules for testing. 105 // Sets Host Resolver Rules for testing.
104 // This method only has any effect before |start| is called. 106 // This method must be called after |start| has been called.
105 + (void)setHostResolverRulesForTesting:(NSString*)hostResolverRulesForTesting; 107 + (void)setHostResolverRulesForTesting:(NSString*)hostResolverRulesForTesting;
106 108
107 // Enables TestCertVerifier which accepts all certificates for testing. 109 // Enables TestCertVerifier which accepts all certificates for testing.
108 // This method only has any effect before |start| is called. 110 // This method only has any effect before |start| is called.
109 + (void)enableTestCertVerifierForTesting; 111 + (void)enableTestCertVerifierForTesting;
110 112
111 @end 113 @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