Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: net/ftp/ftp_network_session.h

Issue 118100: Avoid doing concurrent DNS resolves of the same hostname (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Get compiling on mac Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_SESSION_H_ 5 #ifndef NET_FTP_FTP_NETWORK_SESSION_H_
6 #define NET_FTP_FTP_NETWORK_SESSION_H_ 6 #define NET_FTP_FTP_NETWORK_SESSION_H_
7 7
8 #include "base/ref_counted.h" 8 #include "base/ref_counted.h"
9 #include "net/ftp/ftp_auth_cache.h" 9 #include "net/ftp/ftp_auth_cache.h"
10 10
11 namespace net { 11 namespace net {
12 12
13 class HostResolver;
14
13 // This class holds session objects used by FtpNetworkTransaction objects. 15 // This class holds session objects used by FtpNetworkTransaction objects.
14 class FtpNetworkSession : public base::RefCounted<FtpNetworkSession> { 16 class FtpNetworkSession : public base::RefCounted<FtpNetworkSession> {
15 public: 17 public:
16 FtpNetworkSession() {} 18 explicit FtpNetworkSession(HostResolver* host_resolver)
19 : host_resolver_(host_resolver) {}
17 20
21 HostResolver* host_resolver() { return host_resolver_; }
18 FtpAuthCache* auth_cache() { return &auth_cache_; } 22 FtpAuthCache* auth_cache() { return &auth_cache_; }
19 23
20 private: 24 private:
25 HostResolver* host_resolver_;
21 FtpAuthCache auth_cache_; 26 FtpAuthCache auth_cache_;
22 }; 27 };
23 28
24 } // namespace net 29 } // namespace net
25 30
26 #endif // NET_FTP_FTP_NETWORK_SESSION_H_ 31 #endif // NET_FTP_FTP_NETWORK_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698