summaryrefslogtreecommitdiffstats
path: root/net/ftp/ftp_network_layer.h
blob: 877f8c01ee7f9eddd435ec03e10b4268aec0d090 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef NET_FTP_FTP_NETWORK_LAYER_H_
#define NET_FTP_FTP_NETWORK_LAYER_H_

#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "net/base/net_export.h"
#include "net/ftp/ftp_transaction_factory.h"

namespace net {

class FtpNetworkSession;
class HostResolver;

class NET_EXPORT FtpNetworkLayer : public FtpTransactionFactory {
 public:
  explicit FtpNetworkLayer(HostResolver* host_resolver);
  ~FtpNetworkLayer() override;

  // FtpTransactionFactory methods:
  scoped_ptr<FtpTransaction> CreateTransaction() override;
  void Suspend(bool suspend) override;

 private:
  scoped_ptr<FtpNetworkSession> session_;
  bool suspended_;
  DISALLOW_COPY_AND_ASSIGN(FtpNetworkLayer);
};

}  // namespace net

#endif  // NET_FTP_FTP_NETWORK_LAYER_H_