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
3// found in the LICENSE file.
4
5#ifndef NET_FTP_FTP_NETWORK_LAYER_H_
6#define NET_FTP_FTP_NETWORK_LAYER_H_
7#pragma once
8
9#include "base/memory/ref_counted.h"
10#include "net/ftp/ftp_transaction_factory.h"
11
12namespace net {
13
14class FtpNetworkSession;
15class HostResolver;
16
17class FtpNetworkLayer : public FtpTransactionFactory {
18 public:
19  explicit FtpNetworkLayer(HostResolver* host_resolver);
20  ~FtpNetworkLayer();
21
22  static FtpTransactionFactory* CreateFactory(HostResolver* host_resolver);
23
24  // FtpTransactionFactory methods:
25  virtual FtpTransaction* CreateTransaction();
26  virtual void Suspend(bool suspend);
27
28 private:
29  scoped_refptr<FtpNetworkSession> session_;
30  bool suspended_;
31};
32
33}  // namespace net
34
35#endif  // NET_FTP_FTP_NETWORK_LAYER_H_
36