Chromium Code Reviews| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 // method with nil block. | 74 // method with nil block. |
| 75 + (void)setRequestFilterBlock:(RequestFilterBlock)block; | 75 + (void)setRequestFilterBlock:(RequestFilterBlock)block; |
| 76 | 76 |
| 77 // Starts CronetEngine. It is recommended to call this method on the application | 77 // Starts CronetEngine. It is recommended to call this method on the application |
| 78 // main thread. If the method is called on any thread other than the main one, | 78 // main thread. If the method is called on any thread other than the main one, |
| 79 // the method will internally try to execute synchronously using the main GCD | 79 // the method will internally try to execute synchronously using the main GCD |
| 80 // queue. Please make sure that the main thread is not blocked by a job | 80 // queue. Please make sure that the main thread is not blocked by a job |
| 81 // that calls this method; otherwise, a deadlock can occur. | 81 // that calls this method; otherwise, a deadlock can occur. |
| 82 + (void)start; | 82 + (void)start; |
| 83 | 83 |
| 84 + (void)shutdown; | |
|
mef
2017/04/26 22:19:41
// need comment.
lilyhoughton
2017/04/27 13:53:39
Actually, just removing this.
| |
| 85 | |
| 84 // Registers Cronet as HttpProtocol Handler. Once registered, Cronet intercepts | 86 // Registers Cronet as HttpProtocol Handler. Once registered, Cronet intercepts |
| 85 // and handles all requests made through NSURLConnection and shared | 87 // and handles all requests made through NSURLConnection and shared |
| 86 // NSURLSession. | 88 // NSURLSession. |
| 87 // This method must be called after |start|. | 89 // This method must be called after |start|. |
| 88 + (void)registerHttpProtocolHandler; | 90 + (void)registerHttpProtocolHandler; |
| 89 | 91 |
| 90 // Unregister Cronet as HttpProtocol Handler. This means that Cronet will stop | 92 // Unregister Cronet as HttpProtocol Handler. This means that Cronet will stop |
| 91 // intercepting requests, however, it won't tear down the Cronet environment. | 93 // intercepting requests, however, it won't tear down the Cronet environment. |
| 92 // This method must be called after |start|. | 94 // This method must be called after |start|. |
| 93 + (void)unregisterHttpProtocolHandler; | 95 + (void)unregisterHttpProtocolHandler; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 | 134 |
| 133 // Sets Host Resolver Rules for testing. | 135 // Sets Host Resolver Rules for testing. |
| 134 // This method must be called after |start| has been called. | 136 // This method must be called after |start| has been called. |
| 135 + (void)setHostResolverRulesForTesting:(NSString*)hostResolverRulesForTesting; | 137 + (void)setHostResolverRulesForTesting:(NSString*)hostResolverRulesForTesting; |
| 136 | 138 |
| 137 // Enables TestCertVerifier which accepts all certificates for testing. | 139 // Enables TestCertVerifier which accepts all certificates for testing. |
| 138 // This method only has any effect before |start| is called. | 140 // This method only has any effect before |start| is called. |
| 139 + (void)enableTestCertVerifierForTesting; | 141 + (void)enableTestCertVerifierForTesting; |
| 140 | 142 |
| 141 @end | 143 @end |
| OLD | NEW |