| OLD | NEW |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // 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 "base/ref_counted.h" | 8 #include "base/ref_counted.h" |
| 9 #include "net/ftp/ftp_transaction_factory.h" | 9 #include "net/ftp/ftp_transaction_factory.h" |
| 10 | 10 |
| 11 namespace net { | 11 namespace net { |
| 12 | 12 |
| 13 class FtpNetworkSession; | 13 class FtpNetworkSession; |
| 14 class FtpAuthCache; | 14 class FtpAuthCache; |
| 15 class HostResolver; |
| 15 | 16 |
| 16 class FtpNetworkLayer : public FtpTransactionFactory { | 17 class FtpNetworkLayer : public FtpTransactionFactory { |
| 17 public: | 18 public: |
| 18 FtpNetworkLayer(); | 19 explicit FtpNetworkLayer(HostResolver* host_resolver); |
| 19 ~FtpNetworkLayer(); | 20 ~FtpNetworkLayer(); |
| 20 | 21 |
| 21 static FtpTransactionFactory* CreateFactory(); | 22 static FtpTransactionFactory* CreateFactory(HostResolver* host_resolver); |
| 22 | 23 |
| 23 // FtpTransactionFactory methods: | 24 // FtpTransactionFactory methods: |
| 24 virtual FtpTransaction* CreateTransaction(); | 25 virtual FtpTransaction* CreateTransaction(); |
| 25 virtual void Suspend(bool suspend); | 26 virtual void Suspend(bool suspend); |
| 26 | 27 |
| 27 private: | 28 private: |
| 28 scoped_refptr<FtpNetworkSession> session_; | 29 scoped_refptr<FtpNetworkSession> session_; |
| 29 bool suspended_; | 30 bool suspended_; |
| 30 }; | 31 }; |
| 31 | 32 |
| 32 } // namespace net | 33 } // namespace net |
| 33 | 34 |
| 34 #endif // NET_FTP_FTP_NETWORK_LAYER_H_ | 35 #endif // NET_FTP_FTP_NETWORK_LAYER_H_ |
| OLD | NEW |