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 <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 // Returns the priority level for this request. | 601 // Returns the priority level for this request. |
602 RequestPriority priority() const { return priority_; } | 602 RequestPriority priority() const { return priority_; } |
603 void set_priority(RequestPriority priority) { | 603 void set_priority(RequestPriority priority) { |
604 DCHECK_GE(priority, HIGHEST); | 604 DCHECK_GE(priority, HIGHEST); |
605 DCHECK_LT(priority, NUM_PRIORITIES); | 605 DCHECK_LT(priority, NUM_PRIORITIES); |
606 priority_ = priority; | 606 priority_ = priority; |
607 } | 607 } |
608 | 608 |
609 // This method is intended only for unit tests, but it is being used by | 609 // This method is intended only for unit tests, but it is being used by |
610 // unit tests outside of net :(. | 610 // unit tests outside of net :(. |
611 URLRequestJob* job() { return job_; } | 611 URLRequestJob* job() { return job_.get(); } |
612 | 612 |
613 protected: | 613 protected: |
614 // Allow the URLRequestJob class to control the is_pending() flag. | 614 // Allow the URLRequestJob class to control the is_pending() flag. |
615 void set_is_pending(bool value) { is_pending_ = value; } | 615 void set_is_pending(bool value) { is_pending_ = value; } |
616 | 616 |
617 // Allow the URLRequestJob class to set our status too | 617 // Allow the URLRequestJob class to set our status too |
618 void set_status(const URLRequestStatus& value) { status_ = value; } | 618 void set_status(const URLRequestStatus& value) { status_ = value; } |
619 | 619 |
620 // Allow the URLRequestJob to redirect this request. Returns OK if | 620 // Allow the URLRequestJob to redirect this request. Returns OK if |
621 // successful, otherwise an error code is returned. | 621 // successful, otherwise an error code is returned. |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 scoped_refptr<AuthChallengeInfo> auth_info_; | 792 scoped_refptr<AuthChallengeInfo> auth_info_; |
793 | 793 |
794 base::TimeTicks creation_time_; | 794 base::TimeTicks creation_time_; |
795 | 795 |
796 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 796 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
797 }; | 797 }; |
798 | 798 |
799 } // namespace net | 799 } // namespace net |
800 | 800 |
801 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 801 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
OLD | NEW |