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_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 } | 448 } |
449 | 449 |
450 // Returns the current load state for the request. |param| is an optional | 450 // Returns the current load state for the request. |param| is an optional |
451 // parameter describing details related to the load state. Not all load states | 451 // parameter describing details related to the load state. Not all load states |
452 // have a parameter. | 452 // have a parameter. |
453 LoadStateWithParam GetLoadState() const; | 453 LoadStateWithParam GetLoadState() const; |
454 void SetLoadStateParam(const string16& param) { | 454 void SetLoadStateParam(const string16& param) { |
455 load_state_param_ = param; | 455 load_state_param_ = param; |
456 } | 456 } |
457 | 457 |
458 // Returns the current upload progress in bytes. | 458 // Returns the current upload progress in bytes. When the upload data is |
| 459 // chunked, size is set to zero, but position will not be. |
459 UploadProgress GetUploadProgress() const; | 460 UploadProgress GetUploadProgress() const; |
460 | 461 |
461 // Get response header(s) by ID or name. These methods may only be called | 462 // Get response header(s) by ID or name. These methods may only be called |
462 // once the delegate's OnResponseStarted method has been called. Headers | 463 // once the delegate's OnResponseStarted method has been called. Headers |
463 // that appear more than once in the response are coalesced, with values | 464 // that appear more than once in the response are coalesced, with values |
464 // separated by commas (per RFC 2616). This will not work with cookies since | 465 // separated by commas (per RFC 2616). This will not work with cookies since |
465 // comma can be used in cookie values. | 466 // comma can be used in cookie values. |
466 // TODO(darin): add API to enumerate response headers. | 467 // TODO(darin): add API to enumerate response headers. |
467 void GetResponseHeaderById(int header_id, std::string* value); | 468 void GetResponseHeaderById(int header_id, std::string* value); |
468 void GetResponseHeaderByName(const std::string& name, std::string* value); | 469 void GetResponseHeaderByName(const std::string& name, std::string* value); |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 base::TimeTicks creation_time_; | 831 base::TimeTicks creation_time_; |
831 | 832 |
832 scoped_ptr<const base::debug::StackTrace> stack_trace_; | 833 scoped_ptr<const base::debug::StackTrace> stack_trace_; |
833 | 834 |
834 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 835 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
835 }; | 836 }; |
836 | 837 |
837 } // namespace net | 838 } // namespace net |
838 | 839 |
839 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 840 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
OLD | NEW |