| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 // 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 |
| 47 // effect before |start| is called. See HttpCacheType enum for available | 47 // effect before |start| is called. See HttpCacheType enum for available |
| 48 // options. | 48 // options. |
| 49 + (void)setHttpCacheType:(CRNHttpCacheType)httpCacheType; | 49 + (void)setHttpCacheType:(CRNHttpCacheType)httpCacheType; |
| 50 | 50 |
| 51 // Adds hint that host supports QUIC on altPort. This method only has any effect | 51 // Adds hint that host supports QUIC on altPort. This method only has any effect |
| 52 // before |start| is called. | 52 // before |start| is called. |
| 53 + (void)addQuicHint:(NSString*)host port:(int)port altPort:(int)altPort; | 53 + (void)addQuicHint:(NSString*)host port:(int)port altPort:(int)altPort; |
| 54 | 54 |
| 55 // Set experimental Cronet options. Argument is a JSON string; see |
| 56 // |URLRequestContextConfig| for more details. This method only has |
| 57 // any effect before |start| is called. |
| 58 + (void)setExperimentalOptions:(NSString*)experimentalOptions; |
| 59 |
| 55 // Sets the User-Agent request header string to be sent with all requests. | 60 // Sets the User-Agent request header string to be sent with all requests. |
| 56 // If |partial| is set to YES, then actual user agent value is based on device | 61 // If |partial| is set to YES, then actual user agent value is based on device |
| 57 // model, OS version, and |userAgent| argument. For example "Foo/3.0.0.0" is | 62 // model, OS version, and |userAgent| argument. For example "Foo/3.0.0.0" is |
| 58 // sent as "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3 like Mac OS X) | 63 // sent as "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3 like Mac OS X) |
| 59 // AppleWebKit/601.1 (KHTML, like Gecko) Foo/3.0.0.0 Mobile/15G31 | 64 // AppleWebKit/601.1 (KHTML, like Gecko) Foo/3.0.0.0 Mobile/15G31 |
| 60 // Safari/601.1.46". | 65 // Safari/601.1.46". |
| 61 // If |partial| is set to NO, then |userAgent| value is complete value sent to | 66 // If |partial| is set to NO, then |userAgent| value is complete value sent to |
| 62 // the remote. For Example: "Foo/3.0.0.0" is sent as "Foo/3.0.0.0". | 67 // the remote. For Example: "Foo/3.0.0.0" is sent as "Foo/3.0.0.0". |
| 63 // | 68 // |
| 64 // This method only has any effect before |start| is called. | 69 // This method only has any effect before |start| is called. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 137 |
| 133 // Sets Host Resolver Rules for testing. | 138 // Sets Host Resolver Rules for testing. |
| 134 // This method must be called after |start| has been called. | 139 // This method must be called after |start| has been called. |
| 135 + (void)setHostResolverRulesForTesting:(NSString*)hostResolverRulesForTesting; | 140 + (void)setHostResolverRulesForTesting:(NSString*)hostResolverRulesForTesting; |
| 136 | 141 |
| 137 // Enables TestCertVerifier which accepts all certificates for testing. | 142 // Enables TestCertVerifier which accepts all certificates for testing. |
| 138 // This method only has any effect before |start| is called. | 143 // This method only has any effect before |start| is called. |
| 139 + (void)enableTestCertVerifierForTesting; | 144 + (void)enableTestCertVerifierForTesting; |
| 140 | 145 |
| 141 @end | 146 @end |
| OLD | NEW |