Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: net/ftp/ftp_network_transaction_unittest.cc

Issue 1114383003: Add AllReadDataConsumed and AllWriteDataConsumed methods to SocketDataProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « jingle/glue/chrome_async_socket_unittest.cc ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « jingle/glue/chrome_async_socket_unittest.cc ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698