| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_FTP_FTP_RESPONSE_INFO_H_ | 5 #ifndef NET_FTP_FTP_RESPONSE_INFO_H_ |
| 6 #define NET_FTP_FTP_RESPONSE_INFO_H_ | 6 #define NET_FTP_FTP_RESPONSE_INFO_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "net/base/host_port_pair.h" | 10 #include "net/base/host_port_pair.h" |
| 11 | 11 |
| 12 namespace net { | 12 namespace net { |
| 13 | 13 |
| 14 class FtpResponseInfo { | 14 class FtpResponseInfo { |
| 15 public: | 15 public: |
| 16 FtpResponseInfo() | 16 FtpResponseInfo(); |
| 17 : needs_auth(false), | 17 ~FtpResponseInfo(); |
| 18 expected_content_size(-1), | |
| 19 is_directory_listing(false) { | |
| 20 } | |
| 21 | 18 |
| 22 // True if authentication failed and valid authentication credentials are | 19 // True if authentication failed and valid authentication credentials are |
| 23 // needed. | 20 // needed. |
| 24 bool needs_auth; | 21 bool needs_auth; |
| 25 | 22 |
| 26 // The time at which the request was made that resulted in this response. | 23 // The time at which the request was made that resulted in this response. |
| 27 // For cached responses, this time could be "far" in the past. | 24 // For cached responses, this time could be "far" in the past. |
| 28 base::Time request_time; | 25 base::Time request_time; |
| 29 | 26 |
| 30 // The time at which the response headers were received. For cached | 27 // The time at which the response headers were received. For cached |
| 31 // responses, this time could be "far" in the past. | 28 // responses, this time could be "far" in the past. |
| 32 base::Time response_time; | 29 base::Time response_time; |
| 33 | 30 |
| 34 // Expected content size, in bytes, as reported by SIZE command. Only valid | 31 // Expected content size, in bytes, as reported by SIZE command. Only valid |
| 35 // for file downloads. -1 means unknown size. | 32 // for file downloads. -1 means unknown size. |
| 36 int64 expected_content_size; | 33 int64 expected_content_size; |
| 37 | 34 |
| 38 // True if the response data is of a directory listing. | 35 // True if the response data is of a directory listing. |
| 39 bool is_directory_listing; | 36 bool is_directory_listing; |
| 40 | 37 |
| 41 // Remote address of the socket which fetched this resource. | 38 // Remote address of the socket which fetched this resource. |
| 42 HostPortPair socket_address; | 39 HostPortPair socket_address; |
| 43 }; | 40 }; |
| 44 | 41 |
| 45 } // namespace net | 42 } // namespace net |
| 46 | 43 |
| 47 #endif // NET_FTP_FTP_RESPONSE_INFO_H_ | 44 #endif // NET_FTP_FTP_RESPONSE_INFO_H_ |
| OLD | NEW |