Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: ios/net/crn_http_protocol_handler.mm

Issue 2829703002: Prototype of HttpProtocolHandler perf test with ARC.
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/grpc_support/test/quic_test_server.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « components/grpc_support/test/quic_test_server.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698