| 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_LAYER_H_ | 5 #ifndef NET_FTP_FTP_NETWORK_LAYER_H_ |
| 6 #define NET_FTP_FTP_NETWORK_LAYER_H_ | 6 #define NET_FTP_FTP_NETWORK_LAYER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 11 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
| 12 #include "net/ftp/ftp_transaction_factory.h" | 13 #include "net/ftp/ftp_transaction_factory.h" |
| 13 | 14 |
| 14 namespace net { | 15 namespace net { |
| 15 | 16 |
| 16 class FtpNetworkSession; | 17 class FtpNetworkSession; |
| 17 class HostResolver; | 18 class HostResolver; |
| 18 | 19 |
| 19 class NET_EXPORT FtpNetworkLayer : public FtpTransactionFactory { | 20 class NET_EXPORT FtpNetworkLayer : public FtpTransactionFactory { |
| 20 public: | 21 public: |
| 21 explicit FtpNetworkLayer(HostResolver* host_resolver); | 22 explicit FtpNetworkLayer(HostResolver* host_resolver); |
| 22 ~FtpNetworkLayer() override; | 23 ~FtpNetworkLayer() override; |
| 23 | 24 |
| 24 // FtpTransactionFactory methods: | 25 // FtpTransactionFactory methods: |
| 25 scoped_ptr<FtpTransaction> CreateTransaction() override; | 26 std::unique_ptr<FtpTransaction> CreateTransaction() override; |
| 26 void Suspend(bool suspend) override; | 27 void Suspend(bool suspend) override; |
| 27 | 28 |
| 28 private: | 29 private: |
| 29 scoped_ptr<FtpNetworkSession> session_; | 30 std::unique_ptr<FtpNetworkSession> session_; |
| 30 bool suspended_; | 31 bool suspended_; |
| 31 DISALLOW_COPY_AND_ASSIGN(FtpNetworkLayer); | 32 DISALLOW_COPY_AND_ASSIGN(FtpNetworkLayer); |
| 32 }; | 33 }; |
| 33 | 34 |
| 34 } // namespace net | 35 } // namespace net |
| 35 | 36 |
| 36 #endif // NET_FTP_FTP_NETWORK_LAYER_H_ | 37 #endif // NET_FTP_FTP_NETWORK_LAYER_H_ |
| OLD | NEW |