| OLD | NEW |
| 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 "bidirectional_stream_c.h" |
| 8 | 8 |
| 9 // TODO(mef): Remove this header after transition to bidirectional_stream_c.h | 9 // TODO(mef): Remove this header after transition to bidirectional_stream_c.h |
| 10 // See crbug.com/650462 for details. | 10 // See crbug.com/650462 for details. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // A block, that takes a request, and returns YES if the request should | 24 // A block, that takes a request, and returns YES if the request should |
| 25 // be handled. | 25 // be handled. |
| 26 typedef BOOL (^RequestFilterBlock)(NSURLRequest* request); | 26 typedef BOOL (^RequestFilterBlock)(NSURLRequest* request); |
| 27 | 27 |
| 28 // Interface for installing Cronet. | 28 // Interface for installing Cronet. |
| 29 // TODO(gcasto): Should this macro be separate from the one defined in | 29 // TODO(gcasto): Should this macro be separate from the one defined in |
| 30 // bidirectional_stream_c.h? | 30 // bidirectional_stream_c.h? |
| 31 GRPC_SUPPORT_EXPORT | 31 GRPC_SUPPORT_EXPORT |
| 32 @interface Cronet : NSObject | 32 @interface Cronet : NSObject |
| 33 | 33 |
| 34 // Sets the HTTP Accept-Language header. This method only has any effect before |
| 35 // |start| is called. |
| 36 + (void)setAcceptLanguages:(NSString*)acceptLanguages; |
| 37 |
| 34 // Sets whether HTTP/2 should be supported by CronetEngine. This method only has | 38 // Sets whether HTTP/2 should be supported by CronetEngine. This method only has |
| 35 // any effect before |start| is called. | 39 // any effect before |start| is called. |
| 36 + (void)setHttp2Enabled:(BOOL)http2Enabled; | 40 + (void)setHttp2Enabled:(BOOL)http2Enabled; |
| 37 | 41 |
| 38 // Sets whether QUIC should be supported by CronetEngine. This method only has | 42 // Sets whether QUIC should be supported by CronetEngine. This method only has |
| 39 // any effect before |start| is called. | 43 // any effect before |start| is called. |
| 40 + (void)setQuicEnabled:(BOOL)quicEnabled; | 44 + (void)setQuicEnabled:(BOOL)quicEnabled; |
| 41 | 45 |
| 42 // Set HTTP Cache type to be used by CronetEngine. This method only has any | 46 // Set HTTP Cache type to be used by CronetEngine. This method only has any |
| 43 // effect before |start| is called. See HttpCacheType enum for available | 47 // effect before |start| is called. See HttpCacheType enum for available |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 132 |
| 129 // Sets Host Resolver Rules for testing. | 133 // Sets Host Resolver Rules for testing. |
| 130 // This method must be called after |start| has been called. | 134 // This method must be called after |start| has been called. |
| 131 + (void)setHostResolverRulesForTesting:(NSString*)hostResolverRulesForTesting; | 135 + (void)setHostResolverRulesForTesting:(NSString*)hostResolverRulesForTesting; |
| 132 | 136 |
| 133 // Enables TestCertVerifier which accepts all certificates for testing. | 137 // Enables TestCertVerifier which accepts all certificates for testing. |
| 134 // This method only has any effect before |start| is called. | 138 // This method only has any effect before |start| is called. |
| 135 + (void)enableTestCertVerifierForTesting; | 139 + (void)enableTestCertVerifierForTesting; |
| 136 | 140 |
| 137 @end | 141 @end |
| OLD | NEW |