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_URL_REQUEST_ADAPTER_H_ | 5 #ifndef COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_ |
6 #define COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_ | 6 #define COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "net/base/request_priority.h" | 15 #include "net/base/request_priority.h" |
16 #include "net/http/http_request_headers.h" | 16 #include "net/http/http_request_headers.h" |
17 #include "net/url_request/url_request.h" | 17 #include "net/url_request/url_request.h" |
18 | 18 |
19 namespace net { | 19 namespace net { |
20 class GrowableIOBuffer; | 20 class IOBufferWithSize; |
21 class HttpResponseHeaders; | 21 class HttpResponseHeaders; |
22 class UploadDataStream; | 22 class UploadDataStream; |
23 struct RedirectInfo; | 23 struct RedirectInfo; |
24 } // namespace net | 24 } // namespace net |
25 | 25 |
26 namespace cronet { | 26 namespace cronet { |
27 | 27 |
28 class URLRequestContextAdapter; | 28 class URLRequestContextAdapter; |
29 | 29 |
30 // An adapter from the JNI |UrlRequest| object and the Chromium |URLRequest| | 30 // An adapter from the JNI |UrlRequest| object and the Chromium |URLRequest| |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 void Read(); | 146 void Read(); |
147 | 147 |
148 URLRequestContextAdapter* context_; | 148 URLRequestContextAdapter* context_; |
149 scoped_refptr<URLRequestAdapterDelegate> delegate_; | 149 scoped_refptr<URLRequestAdapterDelegate> delegate_; |
150 GURL url_; | 150 GURL url_; |
151 net::RequestPriority priority_; | 151 net::RequestPriority priority_; |
152 std::string method_; | 152 std::string method_; |
153 net::HttpRequestHeaders headers_; | 153 net::HttpRequestHeaders headers_; |
154 scoped_ptr<net::URLRequest> url_request_; | 154 scoped_ptr<net::URLRequest> url_request_; |
155 scoped_ptr<net::UploadDataStream> upload_data_stream_; | 155 scoped_ptr<net::UploadDataStream> upload_data_stream_; |
156 scoped_refptr<net::GrowableIOBuffer> read_buffer_; | 156 scoped_refptr<net::IOBufferWithSize> read_buffer_; |
157 int bytes_read_; | 157 int bytes_read_; |
158 int total_bytes_read_; | 158 int total_bytes_read_; |
159 int error_code_; | 159 int error_code_; |
160 int http_status_code_; | 160 int http_status_code_; |
161 std::string http_status_text_; | 161 std::string http_status_text_; |
162 std::string content_type_; | 162 std::string content_type_; |
163 bool canceled_; | 163 bool canceled_; |
164 int64 expected_size_; | 164 int64 expected_size_; |
165 bool chunked_upload_; | 165 bool chunked_upload_; |
166 // Indicates whether redirect has been disabled. | 166 // Indicates whether redirect has been disabled. |
167 bool disable_redirect_; | 167 bool disable_redirect_; |
168 | 168 |
169 DISALLOW_COPY_AND_ASSIGN(URLRequestAdapter); | 169 DISALLOW_COPY_AND_ASSIGN(URLRequestAdapter); |
170 }; | 170 }; |
171 | 171 |
172 } // namespace cronet | 172 } // namespace cronet |
173 | 173 |
174 #endif // COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_ | 174 #endif // COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_ |
OLD | NEW |