| 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_FTP_FTP_NETWORK_TRANSACTION_H_ | 5 #ifndef NET_FTP_FTP_NETWORK_TRANSACTION_H_ |
| 6 #define NET_FTP_FTP_NETWORK_TRANSACTION_H_ | 6 #define NET_FTP_FTP_NETWORK_TRANSACTION_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 public: | 31 public: |
| 32 FtpNetworkTransaction(HostResolver* resolver, | 32 FtpNetworkTransaction(HostResolver* resolver, |
| 33 ClientSocketFactory* socket_factory); | 33 ClientSocketFactory* socket_factory); |
| 34 ~FtpNetworkTransaction() override; | 34 ~FtpNetworkTransaction() override; |
| 35 | 35 |
| 36 int Stop(int error); | 36 int Stop(int error); |
| 37 | 37 |
| 38 // FtpTransaction methods: | 38 // FtpTransaction methods: |
| 39 int Start(const FtpRequestInfo* request_info, | 39 int Start(const FtpRequestInfo* request_info, |
| 40 const CompletionCallback& callback, | 40 const CompletionCallback& callback, |
| 41 const BoundNetLog& net_log) override; | 41 const NetLogWithSource& net_log) override; |
| 42 int RestartWithAuth(const AuthCredentials& credentials, | 42 int RestartWithAuth(const AuthCredentials& credentials, |
| 43 const CompletionCallback& callback) override; | 43 const CompletionCallback& callback) override; |
| 44 int Read(IOBuffer* buf, | 44 int Read(IOBuffer* buf, |
| 45 int buf_len, | 45 int buf_len, |
| 46 const CompletionCallback& callback) override; | 46 const CompletionCallback& callback) override; |
| 47 const FtpResponseInfo* GetResponseInfo() const override; | 47 const FtpResponseInfo* GetResponseInfo() const override; |
| 48 LoadState GetLoadState() const override; | 48 LoadState GetLoadState() const override; |
| 49 uint64_t GetUploadProgress() const override; | 49 uint64_t GetUploadProgress() const override; |
| 50 | 50 |
| 51 private: | 51 private: |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 int DoDataRead(); | 194 int DoDataRead(); |
| 195 int DoDataReadComplete(int result); | 195 int DoDataReadComplete(int result); |
| 196 | 196 |
| 197 void RecordDataConnectionError(int result); | 197 void RecordDataConnectionError(int result); |
| 198 | 198 |
| 199 Command command_sent_; | 199 Command command_sent_; |
| 200 | 200 |
| 201 CompletionCallback io_callback_; | 201 CompletionCallback io_callback_; |
| 202 CompletionCallback user_callback_; | 202 CompletionCallback user_callback_; |
| 203 | 203 |
| 204 BoundNetLog net_log_; | 204 NetLogWithSource net_log_; |
| 205 const FtpRequestInfo* request_; | 205 const FtpRequestInfo* request_; |
| 206 FtpResponseInfo response_; | 206 FtpResponseInfo response_; |
| 207 | 207 |
| 208 // Cancels the outstanding request on destruction. | 208 // Cancels the outstanding request on destruction. |
| 209 HostResolver* resolver_; | 209 HostResolver* resolver_; |
| 210 AddressList addresses_; | 210 AddressList addresses_; |
| 211 std::unique_ptr<HostResolver::Request> resolve_request_; | 211 std::unique_ptr<HostResolver::Request> resolve_request_; |
| 212 | 212 |
| 213 // User buffer passed to the Read method for control socket. | 213 // User buffer passed to the Read method for control socket. |
| 214 scoped_refptr<IOBuffer> read_ctrl_buf_; | 214 scoped_refptr<IOBuffer> read_ctrl_buf_; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 | 254 |
| 255 State next_state_; | 255 State next_state_; |
| 256 | 256 |
| 257 // State to switch to after data connection is complete. | 257 // State to switch to after data connection is complete. |
| 258 State state_after_data_connect_complete_; | 258 State state_after_data_connect_complete_; |
| 259 }; | 259 }; |
| 260 | 260 |
| 261 } // namespace net | 261 } // namespace net |
| 262 | 262 |
| 263 #endif // NET_FTP_FTP_NETWORK_TRANSACTION_H_ | 263 #endif // NET_FTP_FTP_NETWORK_TRANSACTION_H_ |
| OLD | NEW |