| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // Temporary layering violation to allow existing users of a deprecated | 42 // Temporary layering violation to allow existing users of a deprecated |
| 43 // interface. | 43 // interface. |
| 44 namespace appcache { | 44 namespace appcache { |
| 45 class AppCacheInterceptor; | 45 class AppCacheInterceptor; |
| 46 class AppCacheRequestHandlerTest; | 46 class AppCacheRequestHandlerTest; |
| 47 class AppCacheURLRequestJobTest; | 47 class AppCacheURLRequestJobTest; |
| 48 } | 48 } |
| 49 | 49 |
| 50 namespace base { | 50 namespace base { |
| 51 class Time; | 51 class Time; |
| 52 class TimeTicks; |
| 52 } // namespace base | 53 } // namespace base |
| 53 | 54 |
| 54 // Temporary layering violation to allow existing users of a deprecated | 55 // Temporary layering violation to allow existing users of a deprecated |
| 55 // interface. | 56 // interface. |
| 56 namespace chrome_browser_net { | 57 namespace chrome_browser_net { |
| 57 class ConnectInterceptor; | 58 class ConnectInterceptor; |
| 58 } | 59 } |
| 59 | 60 |
| 60 // Temporary layering violation to allow existing users of a deprecated | 61 // Temporary layering violation to allow existing users of a deprecated |
| 61 // interface. | 62 // interface. |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 void set_priority(RequestPriority priority) { | 630 void set_priority(RequestPriority priority) { |
| 630 DCHECK_GE(priority, HIGHEST); | 631 DCHECK_GE(priority, HIGHEST); |
| 631 DCHECK_LT(priority, NUM_PRIORITIES); | 632 DCHECK_LT(priority, NUM_PRIORITIES); |
| 632 priority_ = priority; | 633 priority_ = priority; |
| 633 } | 634 } |
| 634 | 635 |
| 635 // This method is intended only for unit tests, but it is being used by | 636 // This method is intended only for unit tests, but it is being used by |
| 636 // unit tests outside of net :(. | 637 // unit tests outside of net :(. |
| 637 URLRequestJob* job() { return job_; } | 638 URLRequestJob* job() { return job_; } |
| 638 | 639 |
| 640 base::TimeTicks start_time() const { return start_time_; } |
| 641 |
| 639 protected: | 642 protected: |
| 640 // Allow the URLRequestJob class to control the is_pending() flag. | 643 // Allow the URLRequestJob class to control the is_pending() flag. |
| 641 void set_is_pending(bool value) { is_pending_ = value; } | 644 void set_is_pending(bool value) { is_pending_ = value; } |
| 642 | 645 |
| 643 // Allow the URLRequestJob class to set our status too | 646 // Allow the URLRequestJob class to set our status too |
| 644 void set_status(const URLRequestStatus& value) { status_ = value; } | 647 void set_status(const URLRequestStatus& value) { status_ = value; } |
| 645 | 648 |
| 646 // Allow the URLRequestJob to redirect this request. Returns OK if | 649 // Allow the URLRequestJob to redirect this request. Returns OK if |
| 647 // successful, otherwise an error code is returned. | 650 // successful, otherwise an error code is returned. |
| 648 int Redirect(const GURL& location, int http_status_code); | 651 int Redirect(const GURL& location, int http_status_code); |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 // TODO(battre): Remove this. http://crbug.com/89049 | 814 // TODO(battre): Remove this. http://crbug.com/89049 |
| 812 bool has_notified_completion_; | 815 bool has_notified_completion_; |
| 813 | 816 |
| 814 // Authentication data used by the NetworkDelegate for this request, | 817 // Authentication data used by the NetworkDelegate for this request, |
| 815 // if one is present. |auth_credentials_| may be filled in when calling | 818 // if one is present. |auth_credentials_| may be filled in when calling |
| 816 // |NotifyAuthRequired| on the NetworkDelegate. |auth_info_| holds | 819 // |NotifyAuthRequired| on the NetworkDelegate. |auth_info_| holds |
| 817 // the authentication challenge being handled by |NotifyAuthRequired|. | 820 // the authentication challenge being handled by |NotifyAuthRequired|. |
| 818 AuthCredentials auth_credentials_; | 821 AuthCredentials auth_credentials_; |
| 819 scoped_refptr<AuthChallengeInfo> auth_info_; | 822 scoped_refptr<AuthChallengeInfo> auth_info_; |
| 820 | 823 |
| 824 // When this request was created. |
| 825 base::TimeTicks start_time_; |
| 826 |
| 821 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 827 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
| 822 }; | 828 }; |
| 823 | 829 |
| 824 } // namespace net | 830 } // namespace net |
| 825 | 831 |
| 826 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 832 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
| OLD | NEW |