| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 | 538 |
| 539 const net::BoundNetLog& net_log() const { return net_log_; } | 539 const net::BoundNetLog& net_log() const { return net_log_; } |
| 540 | 540 |
| 541 // Returns the expected content size if available | 541 // Returns the expected content size if available |
| 542 int64 GetExpectedContentSize() const; | 542 int64 GetExpectedContentSize() const; |
| 543 | 543 |
| 544 // Returns the priority level for this request. | 544 // Returns the priority level for this request. |
| 545 net::RequestPriority priority() const { return priority_; } | 545 net::RequestPriority priority() const { return priority_; } |
| 546 void set_priority(net::RequestPriority priority) { | 546 void set_priority(net::RequestPriority priority) { |
| 547 DCHECK_GE(priority, net::HIGHEST); | 547 DCHECK_GE(priority, net::HIGHEST); |
| 548 DCHECK_LE(priority, net::LOWEST); | 548 DCHECK_LT(priority, net::NUM_PRIORITIES); |
| 549 priority_ = priority; | 549 priority_ = priority; |
| 550 } | 550 } |
| 551 | 551 |
| 552 #ifdef UNIT_TEST | 552 #ifdef UNIT_TEST |
| 553 URLRequestJob* job() { return job_; } | 553 URLRequestJob* job() { return job_; } |
| 554 #endif | 554 #endif |
| 555 | 555 |
| 556 protected: | 556 protected: |
| 557 // Allow the URLRequestJob class to control the is_pending() flag. | 557 // Allow the URLRequestJob class to control the is_pending() flag. |
| 558 void set_is_pending(bool value) { is_pending_ = value; } | 558 void set_is_pending(bool value) { is_pending_ = value; } |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 // The priority level for this request. Objects like ClientSocketPool use | 646 // The priority level for this request. Objects like ClientSocketPool use |
| 647 // this to determine which URLRequest to allocate sockets to first. | 647 // this to determine which URLRequest to allocate sockets to first. |
| 648 net::RequestPriority priority_; | 648 net::RequestPriority priority_; |
| 649 | 649 |
| 650 base::LeakTracker<URLRequest> leak_tracker_; | 650 base::LeakTracker<URLRequest> leak_tracker_; |
| 651 | 651 |
| 652 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 652 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
| 653 }; | 653 }; |
| 654 | 654 |
| 655 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 655 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
| OLD | NEW |