| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef IOS_CRNET_CRNET_H_ |
| 6 #define IOS_CRNET_CRNET_H_ |
| 7 |
| 5 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 6 | 9 |
| 7 // A block, that takes a request, and returns YES if the request should | 10 // A block, that takes a request, and returns YES if the request should |
| 8 // be handled. | 11 // be handled. |
| 9 typedef BOOL(^RequestFilterBlock)(NSURLRequest *request); | 12 typedef BOOL(^RequestFilterBlock)(NSURLRequest *request); |
| 10 | 13 |
| 11 | 14 |
| 12 // A callback, called when the clearCache message has completed. The |errorCode| | 15 // A callback, called when the clearCache message has completed. The |errorCode| |
| 13 // is a network stack error code indicating whether the clear request succeeded | 16 // is a network stack error code indicating whether the clear request succeeded |
| 14 // or not. Even if the request failed, the cache may have been cleared anyway, | 17 // or not. Even if the request failed, the cache may have been cleared anyway, |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 128 |
| 126 // Returns the full user-agent that the stack uses. | 129 // Returns the full user-agent that the stack uses. |
| 127 // This is the exact string servers will see. | 130 // This is the exact string servers will see. |
| 128 + (NSString *)userAgent; | 131 + (NSString *)userAgent; |
| 129 | 132 |
| 130 // Clears CrNet's http cache. The supplied callback, if not nil, is run on an | 133 // Clears CrNet's http cache. The supplied callback, if not nil, is run on an |
| 131 // unspecified thread. | 134 // unspecified thread. |
| 132 + (void)clearCacheWithCompletionCallback:(ClearCacheCallback)completionBlock; | 135 + (void)clearCacheWithCompletionCallback:(ClearCacheCallback)completionBlock; |
| 133 | 136 |
| 134 @end | 137 @end |
| 138 |
| 139 #endif // IOS_CRNET_CRNET_H_ |
| OLD | NEW |