Home | History | Annotate | Download | only in ftp
      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
      3 // LICENSE file.
      4 
      5 #ifndef NET_FTP_FTP_NETWORK_SESSION_H_
      6 #define NET_FTP_FTP_NETWORK_SESSION_H_
      7 
      8 #include "base/ref_counted.h"
      9 #include "net/ftp/ftp_auth_cache.h"
     10 
     11 namespace net {
     12 
     13 class HostResolver;
     14 
     15 // This class holds session objects used by FtpNetworkTransaction objects.
     16 class FtpNetworkSession : public base::RefCounted<FtpNetworkSession> {
     17  public:
     18   explicit FtpNetworkSession(HostResolver* host_resolver)
     19       : host_resolver_(host_resolver) {}
     20 
     21   HostResolver* host_resolver() { return host_resolver_; }
     22   FtpAuthCache* auth_cache() { return &auth_cache_; }
     23 
     24  private:
     25   friend class base::RefCounted<FtpNetworkSession>;
     26 
     27   ~FtpNetworkSession() {}
     28 
     29   scoped_refptr<HostResolver> host_resolver_;
     30   FtpAuthCache auth_cache_;
     31 };
     32 
     33 }  // namespace net
     34 
     35 #endif  // NET_FTP_FTP_NETWORK_SESSION_H_
     36