| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 return traffic_annotation_; | 656 return traffic_annotation_; |
| 657 } | 657 } |
| 658 | 658 |
| 659 protected: | 659 protected: |
| 660 // Allow the URLRequestJob class to control the is_pending() flag. | 660 // Allow the URLRequestJob class to control the is_pending() flag. |
| 661 void set_is_pending(bool value) { is_pending_ = value; } | 661 void set_is_pending(bool value) { is_pending_ = value; } |
| 662 | 662 |
| 663 // Allow the URLRequestJob class to set our status too. | 663 // Allow the URLRequestJob class to set our status too. |
| 664 void set_status(URLRequestStatus status); | 664 void set_status(URLRequestStatus status); |
| 665 | 665 |
| 666 // Allow the URLRequestJob to redirect this request. Returns OK if | 666 // Allow the URLRequestJob to redirect this request. |
| 667 // successful, otherwise an error code is returned. | 667 void Redirect(const RedirectInfo& redirect_info); |
| 668 int Redirect(const RedirectInfo& redirect_info); | |
| 669 | 668 |
| 670 // Called by URLRequestJob to allow interception when a redirect occurs. | 669 // Called by URLRequestJob to allow interception when a redirect occurs. |
| 671 void NotifyReceivedRedirect(const RedirectInfo& redirect_info, | 670 void NotifyReceivedRedirect(const RedirectInfo& redirect_info, |
| 672 bool* defer_redirect); | 671 bool* defer_redirect); |
| 673 | 672 |
| 674 // Allow an interceptor's URLRequestJob to restart this request. | 673 // Allow an interceptor's URLRequestJob to restart this request. |
| 675 // Should only be called if the original job has not started a response. | 674 // Should only be called if the original job has not started a response. |
| 676 void Restart(); | 675 void Restart(); |
| 677 | 676 |
| 678 private: | 677 private: |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 const NetworkTrafficAnnotationTag traffic_annotation_; | 861 const NetworkTrafficAnnotationTag traffic_annotation_; |
| 863 | 862 |
| 864 THREAD_CHECKER(thread_checker_); | 863 THREAD_CHECKER(thread_checker_); |
| 865 | 864 |
| 866 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 865 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
| 867 }; | 866 }; |
| 868 | 867 |
| 869 } // namespace net | 868 } // namespace net |
| 870 | 869 |
| 871 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 870 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
| OLD | NEW |