OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
298 | 298 |
299 // Total number of bytes read from network (or cache) and typically handed | 299 // Total number of bytes read from network (or cache) and typically handed |
300 // to filter to process. Used to histogram compression ratios, and error | 300 // to filter to process. Used to histogram compression ratios, and error |
301 // recovery scenarios in filters. | 301 // recovery scenarios in filters. |
302 int64 filter_input_byte_count() const { return filter_input_byte_count_; } | 302 int64 filter_input_byte_count() const { return filter_input_byte_count_; } |
303 | 303 |
304 // The request that initiated this job. This value MAY BE NULL if the | 304 // The request that initiated this job. This value MAY BE NULL if the |
305 // request was released by DetachRequest(). | 305 // request was released by DetachRequest(). |
306 URLRequest* request_; | 306 URLRequest* request_; |
307 | 307 |
308 // The network delegate to use with this request, if any. | |
309 NetworkDelegate* network_delegate_; | |
mmenke
2013/03/07 15:45:39
Let's just expose this via an accessor instead. S
tedv
2013/03/07 15:58:32
Makes sense; will change that.
On 2013/03/07 15:4
| |
310 | |
308 private: | 311 private: |
309 // When data filtering is enabled, this function is used to read data | 312 // When data filtering is enabled, this function is used to read data |
310 // for the filter. Returns true if raw data was read. Returns false if | 313 // for the filter. Returns true if raw data was read. Returns false if |
311 // an error occurred (or we are waiting for IO to complete). | 314 // an error occurred (or we are waiting for IO to complete). |
312 bool ReadRawDataForFilter(int *bytes_read); | 315 bool ReadRawDataForFilter(int *bytes_read); |
313 | 316 |
314 // Invokes ReadRawData and records bytes read if the read completes | 317 // Invokes ReadRawData and records bytes read if the read completes |
315 // synchronously. | 318 // synchronously. |
316 bool ReadRawDataHelper(IOBuffer* buf, int buf_size, int* bytes_read); | 319 bool ReadRawDataHelper(IOBuffer* buf, int buf_size, int* bytes_read); |
317 | 320 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
372 // OnResponseStarted callback and potentially redirect callbacks as well. | 375 // OnResponseStarted callback and potentially redirect callbacks as well. |
373 bool has_handled_response_; | 376 bool has_handled_response_; |
374 | 377 |
375 // Expected content size | 378 // Expected content size |
376 int64 expected_content_size_; | 379 int64 expected_content_size_; |
377 | 380 |
378 // Set when a redirect is deferred. | 381 // Set when a redirect is deferred. |
379 GURL deferred_redirect_url_; | 382 GURL deferred_redirect_url_; |
380 int deferred_redirect_status_code_; | 383 int deferred_redirect_status_code_; |
381 | 384 |
382 NetworkDelegate* network_delegate_; | |
383 | |
384 base::WeakPtrFactory<URLRequestJob> weak_factory_; | 385 base::WeakPtrFactory<URLRequestJob> weak_factory_; |
385 | 386 |
386 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); | 387 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); |
387 }; | 388 }; |
388 | 389 |
389 } // namespace net | 390 } // namespace net |
390 | 391 |
391 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 392 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
OLD | NEW |