| 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 #include "net/ftp/ftp_network_transaction.h" | 5 #include "net/ftp/ftp_network_transaction.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 State state() const { | 122 State state() const { |
| 123 return state_; | 123 return state_; |
| 124 } | 124 } |
| 125 | 125 |
| 126 void Reset() override { | 126 void Reset() override { |
| 127 DynamicSocketDataProvider::Reset(); | 127 DynamicSocketDataProvider::Reset(); |
| 128 Init(); | 128 Init(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 bool AllReadDataConsumed() const override { return state_ == QUIT; } |
| 132 |
| 133 bool AllWriteDataConsumed() const override { return state_ == QUIT; } |
| 134 |
| 131 void set_multiline_welcome(bool multiline) { multiline_welcome_ = multiline; } | 135 void set_multiline_welcome(bool multiline) { multiline_welcome_ = multiline; } |
| 132 | 136 |
| 133 bool use_epsv() const { return use_epsv_; } | 137 bool use_epsv() const { return use_epsv_; } |
| 134 void set_use_epsv(bool use_epsv) { use_epsv_ = use_epsv; } | 138 void set_use_epsv(bool use_epsv) { use_epsv_ = use_epsv; } |
| 135 | 139 |
| 136 void set_data_type(char data_type) { data_type_ = data_type; } | 140 void set_data_type(char data_type) { data_type_ = data_type; } |
| 137 | 141 |
| 138 protected: | 142 protected: |
| 139 void Init() { | 143 void Init() { |
| 140 state_ = PRE_USER; | 144 state_ = PRE_USER; |
| (...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1570 FtpSocketDataProvider::PRE_TYPE, | 1574 FtpSocketDataProvider::PRE_TYPE, |
| 1571 "257 \"\"\r\n", | 1575 "257 \"\"\r\n", |
| 1572 OK); | 1576 OK); |
| 1573 } | 1577 } |
| 1574 | 1578 |
| 1575 INSTANTIATE_TEST_CASE_P(FTP, | 1579 INSTANTIATE_TEST_CASE_P(FTP, |
| 1576 FtpNetworkTransactionTest, | 1580 FtpNetworkTransactionTest, |
| 1577 ::testing::Values(AF_INET, AF_INET6)); | 1581 ::testing::Values(AF_INET, AF_INET6)); |
| 1578 | 1582 |
| 1579 } // namespace net | 1583 } // namespace net |
| OLD | NEW |