Chromium Code Reviews| Index: net/dns/dns_socket_pool.h |
| diff --git a/net/dns/dns_socket_pool.h b/net/dns/dns_socket_pool.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2a138bc1e46b39bda17551d97089da6593635214 |
| --- /dev/null |
| +++ b/net/dns/dns_socket_pool.h |
| @@ -0,0 +1,50 @@ |
| +// 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_DNS_DNS_SOCKET_POOL_H_ |
| +#define NET_DNS_DNS_SOCKET_POOL_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/memory/scoped_ptr.h" |
| + |
| +namespace net { |
| + |
| +class ClientSocketFactory; |
| +class DatagramClientSocket; |
| +class IPEndPoint; |
| +class NetLog; |
| + |
| +class DnsSocketPool { |
| + public: |
| + static scoped_ptr<DnsSocketPool> MakeDefault(); |
|
szym
2012/09/14 20:49:27
suggest: CreateDefault to avoid ambiguity
Deprecated (see juliatuttle)
2012/09/18 20:28:00
Done.
|
| + |
| + virtual void Initialize( |
| + ClientSocketFactory* socket_factory, |
| + NetLog* net_log, |
| + const std::vector<IPEndPoint>* nameservers); |
|
szym
2012/09/14 20:49:27
I suggest taking a reference and making a copy. Al
Deprecated (see juliatuttle)
2012/09/18 20:28:00
Done.
|
| + |
| + virtual scoped_ptr<DatagramClientSocket> AllocateSocket( |
| + unsigned server_index) = 0; |
| + |
| + virtual void FreeSocket( |
| + unsigned server_index, |
| + scoped_ptr<DatagramClientSocket> socket) = 0; |
| + |
| + protected: |
| + DnsSocketPool(); |
| + |
| + scoped_ptr<DatagramClientSocket> CreateConnectedSocket( |
| + unsigned server_index); |
| + |
| + private: |
| + ClientSocketFactory* socket_factory_; |
| + NetLog* net_log_; |
| + const std::vector<IPEndPoint>* nameservers_; |
| + bool initialized_; |
|
szym
2012/09/14 20:49:27
DISALLOW_COPY_AND_ASSIGN
Deprecated (see juliatuttle)
2012/09/18 20:28:00
Done.
|
| +}; |
| + |
| +} // namespace net |
| + |
| +#endif |