OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TRANSACTION_FACTORY_H_ | 5 #ifndef NET_FTP_FTP_TRANSACTION_FACTORY_H_ |
6 #define NET_FTP_FTP_TRANSACTION_FACTORY_H_ | 6 #define NET_FTP_FTP_TRANSACTION_FACTORY_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include <memory> |
| 9 |
9 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
10 | 11 |
11 namespace net { | 12 namespace net { |
12 | 13 |
13 class FtpTransaction; | 14 class FtpTransaction; |
14 | 15 |
15 // An interface to a class that can create FtpTransaction objects. | 16 // An interface to a class that can create FtpTransaction objects. |
16 class NET_EXPORT FtpTransactionFactory { | 17 class NET_EXPORT FtpTransactionFactory { |
17 public: | 18 public: |
18 virtual ~FtpTransactionFactory() {} | 19 virtual ~FtpTransactionFactory() {} |
19 | 20 |
20 // Creates a FtpTransaction object. | 21 // Creates a FtpTransaction object. |
21 virtual scoped_ptr<FtpTransaction> CreateTransaction() = 0; | 22 virtual std::unique_ptr<FtpTransaction> CreateTransaction() = 0; |
22 | 23 |
23 // Suspends the creation of new transactions. If |suspend| is false, creation | 24 // Suspends the creation of new transactions. If |suspend| is false, creation |
24 // of new transactions is resumed. | 25 // of new transactions is resumed. |
25 virtual void Suspend(bool suspend) = 0; | 26 virtual void Suspend(bool suspend) = 0; |
26 }; | 27 }; |
27 | 28 |
28 } // namespace net | 29 } // namespace net |
29 | 30 |
30 #endif // NET_FTP_FTP_TRANSACTION_FACTORY_H_ | 31 #endif // NET_FTP_FTP_TRANSACTION_FACTORY_H_ |
OLD | NEW |