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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 void set_context(const URLRequestContext* context); | 565 void set_context(const URLRequestContext* context); |
566 | 566 |
567 const BoundNetLog& net_log() const { return net_log_; } | 567 const BoundNetLog& net_log() const { return net_log_; } |
568 | 568 |
569 // Returns the expected content size if available | 569 // Returns the expected content size if available |
570 int64 GetExpectedContentSize() const; | 570 int64 GetExpectedContentSize() const; |
571 | 571 |
572 // Returns the priority level for this request. | 572 // Returns the priority level for this request. |
573 RequestPriority priority() const { return priority_; } | 573 RequestPriority priority() const { return priority_; } |
574 void set_priority(RequestPriority priority) { | 574 void set_priority(RequestPriority priority) { |
575 DCHECK_GE(priority, HIGHEST); | 575 DCHECK_GE(priority, MINIMUM_PRIORITY); |
576 DCHECK_LT(priority, NUM_PRIORITIES); | 576 DCHECK_LT(priority, NUM_PRIORITIES); |
577 priority_ = priority; | 577 priority_ = priority; |
578 } | 578 } |
579 | 579 |
580 // This method is intended only for unit tests, but it is being used by | 580 // This method is intended only for unit tests, but it is being used by |
581 // unit tests outside of net :(. | 581 // unit tests outside of net :(. |
582 URLRequestJob* job() { return job_; } | 582 URLRequestJob* job() { return job_; } |
583 | 583 |
584 protected: | 584 protected: |
585 // Allow the URLRequestJob class to control the is_pending() flag. | 585 // Allow the URLRequestJob class to control the is_pending() flag. |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 scoped_refptr<AuthChallengeInfo> auth_info_; | 758 scoped_refptr<AuthChallengeInfo> auth_info_; |
759 | 759 |
760 base::TimeTicks creation_time_; | 760 base::TimeTicks creation_time_; |
761 | 761 |
762 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 762 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
763 }; | 763 }; |
764 | 764 |
765 } // namespace net | 765 } // namespace net |
766 | 766 |
767 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 767 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
OLD | NEW |