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