summaryrefslogtreecommitdiffstats
path: root/net/socket/socks_client_socket_pool.h
diff options
context:
space:
mode:
authorIain Merrick <husky@google.com>2010-10-19 14:37:37 +0100
committerIain Merrick <husky@google.com>2010-10-19 14:37:37 +0100
commit3345a6884c488ff3a535c2c9acdd33d74b37e311 (patch)
tree7784b988ef1698cb6967ea1bdf07616237716c6c /net/socket/socks_client_socket_pool.h
parentefc8475837ec58186051f23bb03542620424f6ce (diff)
downloadexternal_chromium-3345a6884c488ff3a535c2c9acdd33d74b37e311.zip
external_chromium-3345a6884c488ff3a535c2c9acdd33d74b37e311.tar.gz
external_chromium-3345a6884c488ff3a535c2c9acdd33d74b37e311.tar.bz2
Merge Chromium at 7.0.540.0 : Initial merge by git
Not including third_party/icu as it contains huge data files that break Gerrit, and aren't actually used. Change-Id: I428a386e70f3b58cacd28677b8cfda282e891e15
Diffstat (limited to 'net/socket/socks_client_socket_pool.h')
-rw-r--r--net/socket/socks_client_socket_pool.h40
1 files changed, 22 insertions, 18 deletions
diff --git a/net/socket/socks_client_socket_pool.h b/net/socket/socks_client_socket_pool.h
index 4387aa7..383de63 100644
--- a/net/socket/socks_client_socket_pool.h
+++ b/net/socket/socks_client_socket_pool.h
@@ -4,6 +4,7 @@
#ifndef NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_
#define NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_
+#pragma once
#include <string>
@@ -14,16 +15,15 @@
#include "base/time.h"
#include "net/base/host_port_pair.h"
#include "net/base/host_resolver.h"
-#include "net/proxy/proxy_server.h"
#include "net/socket/client_socket_pool_base.h"
#include "net/socket/client_socket_pool_histograms.h"
#include "net/socket/client_socket_pool.h"
-#include "net/socket/tcp_client_socket_pool.h"
namespace net {
-class ClientSocketFactory;
class ConnectJobFactory;
+class TCPClientSocketPool;
+class TCPSocketParams;
class SOCKSSocketParams : public base::RefCounted<SOCKSSocketParams> {
public:
@@ -57,7 +57,7 @@ class SOCKSConnectJob : public ConnectJob {
SOCKSConnectJob(const std::string& group_name,
const scoped_refptr<SOCKSSocketParams>& params,
const base::TimeDelta& timeout_duration,
- const scoped_refptr<TCPClientSocketPool>& tcp_pool,
+ TCPClientSocketPool* tcp_pool,
const scoped_refptr<HostResolver> &host_resolver,
Delegate* delegate,
NetLog* net_log);
@@ -68,11 +68,11 @@ class SOCKSConnectJob : public ConnectJob {
private:
enum State {
- kStateTCPConnect,
- kStateTCPConnectComplete,
- kStateSOCKSConnect,
- kStateSOCKSConnectComplete,
- kStateNone,
+ STATE_TCP_CONNECT,
+ STATE_TCP_CONNECT_COMPLETE,
+ STATE_SOCKS_CONNECT,
+ STATE_SOCKS_CONNECT_COMPLETE,
+ STATE_NONE,
};
// Begins the tcp connection and the SOCKS handshake. Returns OK on success
@@ -91,7 +91,7 @@ class SOCKSConnectJob : public ConnectJob {
int DoSOCKSConnectComplete(int result);
scoped_refptr<SOCKSSocketParams> socks_params_;
- const scoped_refptr<TCPClientSocketPool> tcp_pool_;
+ TCPClientSocketPool* const tcp_pool_;
const scoped_refptr<HostResolver> resolver_;
State next_state_;
@@ -107,11 +107,13 @@ class SOCKSClientSocketPool : public ClientSocketPool {
SOCKSClientSocketPool(
int max_sockets,
int max_sockets_per_group,
- const scoped_refptr<ClientSocketPoolHistograms>& histograms,
+ ClientSocketPoolHistograms* histograms,
const scoped_refptr<HostResolver>& host_resolver,
- const scoped_refptr<TCPClientSocketPool>& tcp_pool,
+ TCPClientSocketPool* tcp_pool,
NetLog* net_log);
+ virtual ~SOCKSClientSocketPool();
+
// ClientSocketPool methods:
virtual int RequestSocket(const std::string& group_name,
const void* connect_params,
@@ -140,23 +142,24 @@ class SOCKSClientSocketPool : public ClientSocketPool {
virtual LoadState GetLoadState(const std::string& group_name,
const ClientSocketHandle* handle) const;
+ virtual DictionaryValue* GetInfoAsValue(const std::string& name,
+ const std::string& type,
+ bool include_nested_pools) const;
+
virtual base::TimeDelta ConnectionTimeout() const {
return base_.ConnectionTimeout();
}
- virtual scoped_refptr<ClientSocketPoolHistograms> histograms() const {
+ virtual ClientSocketPoolHistograms* histograms() const {
return base_.histograms();
};
- protected:
- virtual ~SOCKSClientSocketPool();
-
private:
typedef ClientSocketPoolBase<SOCKSSocketParams> PoolBase;
class SOCKSConnectJobFactory : public PoolBase::ConnectJobFactory {
public:
- SOCKSConnectJobFactory(const scoped_refptr<TCPClientSocketPool>& tcp_pool,
+ SOCKSConnectJobFactory(TCPClientSocketPool* tcp_pool,
HostResolver* host_resolver,
NetLog* net_log)
: tcp_pool_(tcp_pool),
@@ -174,13 +177,14 @@ class SOCKSClientSocketPool : public ClientSocketPool {
virtual base::TimeDelta ConnectionTimeout() const;
private:
- const scoped_refptr<TCPClientSocketPool> tcp_pool_;
+ TCPClientSocketPool* const tcp_pool_;
const scoped_refptr<HostResolver> host_resolver_;
NetLog* net_log_;
DISALLOW_COPY_AND_ASSIGN(SOCKSConnectJobFactory);
};
+ TCPClientSocketPool* const tcp_pool_;
PoolBase base_;
DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocketPool);