1c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott// Copyright (c) 2008 The Chromium Authors. All rights reserved.  Use of this
2c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott// source code is governed by a BSD-style license that can be found in the
3c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott// LICENSE file.
4c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott
5c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott#ifndef NET_FTP_FTP_NETWORK_SESSION_H_
6c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott#define NET_FTP_FTP_NETWORK_SESSION_H_
7c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott
8c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott#include "base/ref_counted.h"
9c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott#include "net/ftp/ftp_auth_cache.h"
10c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott
11c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottnamespace net {
12c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott
13c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottclass HostResolver;
14c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott
15c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott// This class holds session objects used by FtpNetworkTransaction objects.
16c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottclass FtpNetworkSession : public base::RefCounted<FtpNetworkSession> {
17c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott public:
18c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott  explicit FtpNetworkSession(HostResolver* host_resolver)
19c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott      : host_resolver_(host_resolver) {}
20c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott
21c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott  HostResolver* host_resolver() { return host_resolver_; }
22c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott  FtpAuthCache* auth_cache() { return &auth_cache_; }
23c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott
24c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott private:
25c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott  friend class base::RefCounted<FtpNetworkSession>;
26c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott
27c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott  ~FtpNetworkSession() {}
28c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott
29c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott  scoped_refptr<HostResolver> host_resolver_;
30c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott  FtpAuthCache auth_cache_;
31c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott};
32c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott
33c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott}  // namespace net
34c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott
35c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott#endif  // NET_FTP_FTP_NETWORK_SESSION_H_
36