| 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 // Type of HTTP cache; public interface to private implementation defined in | 9 // Type of HTTP cache; public interface to private implementation defined in |
| 10 // URLRequestContextConfig class. | 10 // URLRequestContextConfig class. |
| 11 typedef NS_ENUM(NSInteger, CRNHttpCacheType) { | 11 typedef NS_ENUM(NSInteger, CRNHttpCacheType) { |
| 12 // Disabled HTTP cache. Some data may still be temporarily stored in memory. | 12 // Disabled HTTP cache. Some data may still be temporarily stored in memory. |
| 13 CRNHttpCacheTypeDisabled, | 13 CRNHttpCacheTypeDisabled, |
| 14 // Enable on-disk HTTP cache, including HTTP data. | 14 // Enable on-disk HTTP cache, including HTTP data. |
| 15 CRNHttpCacheTypeDisk, | 15 CRNHttpCacheTypeDisk, |
| 16 // Enable in-memory cache, including HTTP data. | 16 // Enable in-memory cache, including HTTP data. |
| 17 CRNHttpCacheTypeMemory, | 17 CRNHttpCacheTypeMemory, |
| 18 }; | 18 }; |
| 19 | 19 |
| 20 /// Cronet error domain name. | 20 /// Cronet error domain name. |
| 21 NSString* const CRNCronetErrorDomain = @"CRNCronetErrorDomain"; | 21 FOUNDATION_EXPORT GRPC_SUPPORT_EXPORT NSString* const CRNCronetErrorDomain; |
| 22 | 22 |
| 23 /// Enum of Cronet NSError codes. | 23 /// Enum of Cronet NSError codes. |
| 24 NS_ENUM(NSInteger){ | 24 NS_ENUM(NSInteger){ |
| 25 CRNErrorInvalidArgument = 1001, | 25 CRNErrorInvalidArgument = 1001, |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 /// The corresponding value is a String object that contains the name of | 28 /// The corresponding value is a String object that contains the name of |
| 29 /// an invalid argument inside the NSError userInfo dictionary. | 29 /// an invalid argument inside the NSError userInfo dictionary. |
| 30 NSString* const CRNInvalidArgumentKey = @"CRNInvalidArgumentKey"; | 30 FOUNDATION_EXPORT GRPC_SUPPORT_EXPORT NSString* const CRNInvalidArgumentKey; |
| 31 | 31 |
| 32 // A block, that takes a request, and returns YES if the request should | 32 // A block, that takes a request, and returns YES if the request should |
| 33 // be handled. | 33 // be handled. |
| 34 typedef BOOL (^RequestFilterBlock)(NSURLRequest* request); | 34 typedef BOOL (^RequestFilterBlock)(NSURLRequest* request); |
| 35 | 35 |
| 36 // Interface for installing Cronet. | 36 // Interface for installing Cronet. |
| 37 // TODO(gcasto): Should this macro be separate from the one defined in | 37 // TODO(gcasto): Should this macro be separate from the one defined in |
| 38 // bidirectional_stream_c.h? | 38 // bidirectional_stream_c.h? |
| 39 GRPC_SUPPORT_EXPORT | 39 GRPC_SUPPORT_EXPORT |
| 40 @interface Cronet : NSObject | 40 @interface Cronet : NSObject |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 184 |
| 185 // Sets Host Resolver Rules for testing. | 185 // Sets Host Resolver Rules for testing. |
| 186 // This method must be called after |start| has been called. | 186 // This method must be called after |start| has been called. |
| 187 + (void)setHostResolverRulesForTesting:(NSString*)hostResolverRulesForTesting; | 187 + (void)setHostResolverRulesForTesting:(NSString*)hostResolverRulesForTesting; |
| 188 | 188 |
| 189 // Enables TestCertVerifier which accepts all certificates for testing. | 189 // Enables TestCertVerifier which accepts all certificates for testing. |
| 190 // This method only has any effect before |start| is called. | 190 // This method only has any effect before |start| is called. |
| 191 + (void)enableTestCertVerifierForTesting; | 191 + (void)enableTestCertVerifierForTesting; |
| 192 | 192 |
| 193 @end | 193 @end |
| OLD | NEW |