[email protected] | 2e936d97 | 2011-05-18 21:47:52 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
[email protected] | 5461d9d | 2010-07-31 23:10:07 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
[email protected] | 0da3fea3 | 2008-12-17 23:08:24 | [diff] [blame] | 4 | |
5 | #ifndef NET_FTP_FTP_TRANSACTION_FACTORY_H_ | ||||
6 | #define NET_FTP_FTP_TRANSACTION_FACTORY_H_ | ||||
7 | |||||
danakj | a9850e1 | 2016-04-18 22:28:08 | [diff] [blame] | 8 | #include <memory> |
9 | |||||
[email protected] | 172da1b | 2011-08-12 15:52:26 | [diff] [blame] | 10 | #include "net/base/net_export.h" |
[email protected] | 2e936d97 | 2011-05-18 21:47:52 | [diff] [blame] | 11 | |
[email protected] | 0da3fea3 | 2008-12-17 23:08:24 | [diff] [blame] | 12 | namespace net { |
13 | |||||
[email protected] | 0da3fea3 | 2008-12-17 23:08:24 | [diff] [blame] | 14 | class FtpTransaction; |
15 | |||||
16 | // An interface to a class that can create FtpTransaction objects. | ||||
[email protected] | 172da1b | 2011-08-12 15:52:26 | [diff] [blame] | 17 | class NET_EXPORT FtpTransactionFactory { |
[email protected] | 0da3fea3 | 2008-12-17 23:08:24 | [diff] [blame] | 18 | public: |
19 | virtual ~FtpTransactionFactory() {} | ||||
20 | |||||
21 | // Creates a FtpTransaction object. | ||||
danakj | a9850e1 | 2016-04-18 22:28:08 | [diff] [blame] | 22 | virtual std::unique_ptr<FtpTransaction> CreateTransaction() = 0; |
[email protected] | 0da3fea3 | 2008-12-17 23:08:24 | [diff] [blame] | 23 | |
[email protected] | 0da3fea3 | 2008-12-17 23:08:24 | [diff] [blame] | 24 | // Suspends the creation of new transactions. If |suspend| is false, creation |
25 | // of new transactions is resumed. | ||||
26 | virtual void Suspend(bool suspend) = 0; | ||||
27 | }; | ||||
28 | |||||
29 | } // namespace net | ||||
30 | |||||
31 | #endif // NET_FTP_FTP_TRANSACTION_FACTORY_H_ |