| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "ios/net/crn_http_protocol_handler.h" | 5 #import "ios/net/crn_http_protocol_handler.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #error "This file requires ARC support." | 44 #error "This file requires ARC support." |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 namespace net { | 47 namespace net { |
| 48 class HttpProtocolHandlerCore; | 48 class HttpProtocolHandlerCore; |
| 49 } | 49 } |
| 50 | 50 |
| 51 namespace { | 51 namespace { |
| 52 | 52 |
| 53 // Size of the buffer used to read the net::URLRequest. | 53 // Size of the buffer used to read the net::URLRequest. |
| 54 const int kIOBufferSize = 4096; | 54 const int kIOBufferSize = 64 * 1024; |
| 55 | 55 |
| 56 // Global instance of the HTTPProtocolHandlerDelegate. | 56 // Global instance of the HTTPProtocolHandlerDelegate. |
| 57 net::HTTPProtocolHandlerDelegate* g_protocol_handler_delegate = nullptr; | 57 net::HTTPProtocolHandlerDelegate* g_protocol_handler_delegate = nullptr; |
| 58 | 58 |
| 59 // Empty callback. | 59 // Empty callback. |
| 60 void DoNothing(bool flag) {} | 60 void DoNothing(bool flag) {} |
| 61 | 61 |
| 62 } // namespace | 62 } // namespace |
| 63 | 63 |
| 64 // Bridge class to forward NSStream events to the HttpProtocolHandlerCore. | 64 // Bridge class to forward NSStream events to the HttpProtocolHandlerCore. |
| (...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 [[DeferredCancellation alloc] initWithCore:[self getCore]]; | 1032 [[DeferredCancellation alloc] initWithCore:[self getCore]]; |
| 1033 NSArray* modes = @[ [[NSRunLoop currentRunLoop] currentMode] ]; | 1033 NSArray* modes = @[ [[NSRunLoop currentRunLoop] currentMode] ]; |
| 1034 [cancellation performSelector:@selector(cancel) | 1034 [cancellation performSelector:@selector(cancel) |
| 1035 onThread:[self getClientThread] | 1035 onThread:[self getClientThread] |
| 1036 withObject:nil | 1036 withObject:nil |
| 1037 waitUntilDone:NO | 1037 waitUntilDone:NO |
| 1038 modes:modes]; | 1038 modes:modes]; |
| 1039 } | 1039 } |
| 1040 | 1040 |
| 1041 @end | 1041 @end |
| OLD | NEW |