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 13 matching lines...) Expand all Loading... |
24 #include "net/base/load_timing_info.h" | 24 #include "net/base/load_timing_info.h" |
25 #include "net/base/net_error_details.h" | 25 #include "net/base/net_error_details.h" |
26 #include "net/base/net_export.h" | 26 #include "net/base/net_export.h" |
27 #include "net/base/network_delegate.h" | 27 #include "net/base/network_delegate.h" |
28 #include "net/base/request_priority.h" | 28 #include "net/base/request_priority.h" |
29 #include "net/base/upload_progress.h" | 29 #include "net/base/upload_progress.h" |
30 #include "net/cookies/canonical_cookie.h" | 30 #include "net/cookies/canonical_cookie.h" |
31 #include "net/http/http_request_headers.h" | 31 #include "net/http/http_request_headers.h" |
32 #include "net/http/http_response_info.h" | 32 #include "net/http/http_response_info.h" |
33 #include "net/log/net_log.h" | 33 #include "net/log/net_log.h" |
| 34 #include "net/proxy/proxy_server.h" |
34 #include "net/socket/connection_attempts.h" | 35 #include "net/socket/connection_attempts.h" |
35 #include "net/url_request/url_request_status.h" | 36 #include "net/url_request/url_request_status.h" |
36 #include "url/gurl.h" | 37 #include "url/gurl.h" |
37 #include "url/origin.h" | 38 #include "url/origin.h" |
38 | 39 |
39 namespace base { | 40 namespace base { |
40 class Value; | 41 class Value; |
41 | 42 |
42 namespace debug { | 43 namespace debug { |
43 class StackTrace; | 44 class StackTrace; |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 | 629 |
629 // The number of bytes in the raw response body (before any decompression, | 630 // The number of bytes in the raw response body (before any decompression, |
630 // etc.). This is only available after the final Read completes. Not available | 631 // etc.). This is only available after the final Read completes. Not available |
631 // for FTP responses. | 632 // for FTP responses. |
632 int64_t received_response_content_length() const { | 633 int64_t received_response_content_length() const { |
633 return received_response_content_length_; | 634 return received_response_content_length_; |
634 } | 635 } |
635 | 636 |
636 // Available at NetworkDelegate::NotifyHeadersReceived() time, which is before | 637 // Available at NetworkDelegate::NotifyHeadersReceived() time, which is before |
637 // the more general response_info() is available, even though it is a subset. | 638 // the more general response_info() is available, even though it is a subset. |
638 const HostPortPair& proxy_server() const { | 639 const ProxyServer& proxy_server() const { return proxy_server_; } |
639 return proxy_server_; | |
640 } | |
641 | 640 |
642 // Gets the connection attempts made in the process of servicing this | 641 // Gets the connection attempts made in the process of servicing this |
643 // URLRequest. Only guaranteed to be valid if called after the request fails | 642 // URLRequest. Only guaranteed to be valid if called after the request fails |
644 // or after the response headers are received. | 643 // or after the response headers are received. |
645 void GetConnectionAttempts(ConnectionAttempts* out) const; | 644 void GetConnectionAttempts(ConnectionAttempts* out) const; |
646 | 645 |
647 // Gets the over the wire raw header size of the response after https | 646 // Gets the over the wire raw header size of the response after https |
648 // encryption, 0 for cached responses. | 647 // encryption, 0 for cached responses. |
649 int raw_header_size() const { return raw_header_size_; } | 648 int raw_header_size() const { return raw_header_size_; } |
650 | 649 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 | 845 |
847 int64_t received_response_content_length_; | 846 int64_t received_response_content_length_; |
848 | 847 |
849 base::TimeTicks creation_time_; | 848 base::TimeTicks creation_time_; |
850 | 849 |
851 // Timing information for the most recent request. Its start times are | 850 // Timing information for the most recent request. Its start times are |
852 // populated during Start(), and the rest are populated in OnResponseReceived. | 851 // populated during Start(), and the rest are populated in OnResponseReceived. |
853 LoadTimingInfo load_timing_info_; | 852 LoadTimingInfo load_timing_info_; |
854 | 853 |
855 // The proxy server used for this request, if any. | 854 // The proxy server used for this request, if any. |
856 HostPortPair proxy_server_; | 855 ProxyServer proxy_server_; |
857 | 856 |
858 // The raw header size of the response. | 857 // The raw header size of the response. |
859 int raw_header_size_; | 858 int raw_header_size_; |
860 | 859 |
861 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 860 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
862 }; | 861 }; |
863 | 862 |
864 } // namespace net | 863 } // namespace net |
865 | 864 |
866 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 865 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
OLD | NEW |