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 COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_ | 5 #ifndef COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_ |
6 #define COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_ | 6 #define COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "net/url_request/url_request.h" | 21 #include "net/url_request/url_request.h" |
22 #include "url/gurl.h" | 22 #include "url/gurl.h" |
23 | 23 |
24 namespace base { | 24 namespace base { |
25 class SingleThreadTaskRunner; | 25 class SingleThreadTaskRunner; |
26 } // namespace base | 26 } // namespace base |
27 | 27 |
28 namespace net { | 28 namespace net { |
29 class HttpRequestHeaders; | 29 class HttpRequestHeaders; |
30 class HttpResponseHeaders; | 30 class HttpResponseHeaders; |
| 31 class SSLCertRequestInfo; |
31 class SSLInfo; | 32 class SSLInfo; |
32 class UploadDataStream; | 33 class UploadDataStream; |
33 } // namespace net | 34 } // namespace net |
34 | 35 |
35 namespace cronet { | 36 namespace cronet { |
36 | 37 |
37 class CronetURLRequestContextAdapter; | 38 class CronetURLRequestContextAdapter; |
38 | 39 |
39 bool CronetUrlRequestAdapterRegisterJni(JNIEnv* env); | 40 bool CronetUrlRequestAdapterRegisterJni(JNIEnv* env); |
40 | 41 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 jobject jcaller) const; | 112 jobject jcaller) const; |
112 | 113 |
113 // Returns true if response is coming from the cache. | 114 // Returns true if response is coming from the cache. |
114 jboolean GetWasCached(JNIEnv* env, jobject jcaller) const; | 115 jboolean GetWasCached(JNIEnv* env, jobject jcaller) const; |
115 | 116 |
116 // net::URLRequest::Delegate implementations: | 117 // net::URLRequest::Delegate implementations: |
117 | 118 |
118 void OnReceivedRedirect(net::URLRequest* request, | 119 void OnReceivedRedirect(net::URLRequest* request, |
119 const net::RedirectInfo& redirect_info, | 120 const net::RedirectInfo& redirect_info, |
120 bool* defer_redirect) override; | 121 bool* defer_redirect) override; |
| 122 void OnCertificateRequested( |
| 123 net::URLRequest* request, |
| 124 net::SSLCertRequestInfo* cert_request_info) override; |
121 void OnSSLCertificateError(net::URLRequest* request, | 125 void OnSSLCertificateError(net::URLRequest* request, |
122 const net::SSLInfo& ssl_info, | 126 const net::SSLInfo& ssl_info, |
123 bool fatal) override; | 127 bool fatal) override; |
124 void OnResponseStarted(net::URLRequest* request) override; | 128 void OnResponseStarted(net::URLRequest* request) override; |
125 void OnReadCompleted(net::URLRequest* request, int bytes_read) override; | 129 void OnReadCompleted(net::URLRequest* request, int bytes_read) override; |
126 | 130 |
127 private: | 131 private: |
128 class IOBufferWithByteBuffer; | 132 class IOBufferWithByteBuffer; |
129 | 133 |
130 void StartOnNetworkThread(); | 134 void StartOnNetworkThread(); |
(...skipping 27 matching lines...) Expand all Loading... |
158 | 162 |
159 scoped_refptr<IOBufferWithByteBuffer> read_buffer_; | 163 scoped_refptr<IOBufferWithByteBuffer> read_buffer_; |
160 scoped_ptr<net::URLRequest> url_request_; | 164 scoped_ptr<net::URLRequest> url_request_; |
161 | 165 |
162 DISALLOW_COPY_AND_ASSIGN(CronetURLRequestAdapter); | 166 DISALLOW_COPY_AND_ASSIGN(CronetURLRequestAdapter); |
163 }; | 167 }; |
164 | 168 |
165 } // namespace cronet | 169 } // namespace cronet |
166 | 170 |
167 #endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_ | 171 #endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_ |
OLD | NEW |