diff options
author | szym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-15 21:21:29 +0000 |
---|---|---|
committer | szym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-15 21:21:29 +0000 |
commit | acdda419e470cd47c9983dbd7bc90e4472dedfc8 (patch) | |
tree | c62fa1d5a16a7d7b32b10c631131be9192ef1444 /net/socket | |
parent | 3e8d173fa8baad978ccb0e38926d5fed652cdc53 (diff) | |
download | chromium_src-acdda419e470cd47c9983dbd7bc90e4472dedfc8.zip chromium_src-acdda419e470cd47c9983dbd7bc90e4472dedfc8.tar.gz chromium_src-acdda419e470cd47c9983dbd7bc90e4472dedfc8.tar.bz2 |
Remove referrer from TransportSocketParams and SOCKSSocketParams.
BUG=none
TEST=compiles
R=eroman
Review URL: http://codereview.chromium.org/8572018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110168 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket')
-rw-r--r-- | net/socket/client_socket_pool_manager.cc | 12 | ||||
-rw-r--r-- | net/socket/deterministic_socket_data_unittest.cc | 3 | ||||
-rw-r--r-- | net/socket/socks_client_socket.h | 1 | ||||
-rw-r--r-- | net/socket/socks_client_socket_pool.cc | 5 | ||||
-rw-r--r-- | net/socket/socks_client_socket_pool.h | 2 | ||||
-rw-r--r-- | net/socket/socks_client_socket_pool_unittest.cc | 4 | ||||
-rw-r--r-- | net/socket/ssl_client_socket_pool_unittest.cc | 6 | ||||
-rw-r--r-- | net/socket/transport_client_socket_pool.cc | 5 | ||||
-rw-r--r-- | net/socket/transport_client_socket_pool.h | 4 | ||||
-rw-r--r-- | net/socket/transport_client_socket_pool_unittest.cc | 12 |
10 files changed, 16 insertions, 38 deletions
diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc index 76b8715..b47c3e5 100644 --- a/net/socket/client_socket_pool_manager.cc +++ b/net/socket/client_socket_pool_manager.cc @@ -78,13 +78,6 @@ int InitSocketPoolHelper(const GURL& request_url, scoped_refptr<SOCKSSocketParams> socks_params; scoped_ptr<HostPortPair> proxy_host_port; - GURL request_referrer; - std::string request_referrer_str; - if (request_extra_headers.GetHeader(HttpRequestHeaders::kReferer, - &request_referrer_str)) { - request_referrer = GURL(request_referrer_str); - } - bool using_ssl = request_url.SchemeIs("https") || force_spdy_over_ssl; HostPortPair origin_host_port = @@ -118,7 +111,6 @@ int InitSocketPoolHelper(const GURL& request_url, if (proxy_info.is_direct()) { tcp_params = new TransportSocketParams(origin_host_port, request_priority, - request_referrer, disable_resolver_cache, ignore_limits); } else { @@ -127,7 +119,6 @@ int InitSocketPoolHelper(const GURL& request_url, scoped_refptr<TransportSocketParams> proxy_tcp_params( new TransportSocketParams(*proxy_host_port, request_priority, - request_referrer, disable_resolver_cache, ignore_limits)); @@ -173,8 +164,7 @@ int InitSocketPoolHelper(const GURL& request_url, socks_params = new SOCKSSocketParams(proxy_tcp_params, socks_version == '5', origin_host_port, - request_priority, - request_referrer); + request_priority); } } diff --git a/net/socket/deterministic_socket_data_unittest.cc b/net/socket/deterministic_socket_data_unittest.cc index 6d8d7e4..cb6ca32 100644 --- a/net/socket/deterministic_socket_data_unittest.cc +++ b/net/socket/deterministic_socket_data_unittest.cc @@ -50,7 +50,6 @@ class DeterministicSocketDataTest : public PlatformTest { scoped_refptr<IOBuffer> read_buf_; MockConnect connect_data_; - GURL url_; HostPortPair endpoint_; scoped_refptr<TransportSocketParams> tcp_params_; ClientSocketPoolHistograms histograms_; @@ -68,11 +67,9 @@ DeterministicSocketDataTest::DeterministicSocketDataTest() data_(NULL), read_buf_(NULL), connect_data_(false, OK), - url_("https://www.google.com"), endpoint_("www.google.com", 443), tcp_params_(new TransportSocketParams(endpoint_, LOWEST, - url_, false, false)), histograms_(""), diff --git a/net/socket/socks_client_socket.h b/net/socket/socks_client_socket.h index a7aff1c..442db90 100644 --- a/net/socket/socks_client_socket.h +++ b/net/socket/socks_client_socket.h @@ -12,7 +12,6 @@ #include "base/gtest_prod_util.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" -#include "googleurl/src/gurl.h" #include "net/base/address_list.h" #include "net/base/completion_callback.h" #include "net/base/host_resolver.h" diff --git a/net/socket/socks_client_socket_pool.cc b/net/socket/socks_client_socket_pool.cc index aa0373d..7f1967b 100644 --- a/net/socket/socks_client_socket_pool.cc +++ b/net/socket/socks_client_socket_pool.cc @@ -6,7 +6,6 @@ #include "base/time.h" #include "base/values.h" -#include "googleurl/src/gurl.h" #include "net/base/net_errors.h" #include "net/socket/client_socket_factory.h" #include "net/socket/client_socket_handle.h" @@ -17,13 +16,11 @@ namespace net { -// TODO(szym): remove unneeded referrer SOCKSSocketParams::SOCKSSocketParams( const scoped_refptr<TransportSocketParams>& proxy_server, bool socks_v5, const HostPortPair& host_port_pair, - RequestPriority priority, - const GURL& referrer) + RequestPriority priority) : transport_params_(proxy_server), destination_(host_port_pair), socks_v5_(socks_v5) { diff --git a/net/socket/socks_client_socket_pool.h b/net/socket/socks_client_socket_pool.h index 11dbd33..741e0a3 100644 --- a/net/socket/socks_client_socket_pool.h +++ b/net/socket/socks_client_socket_pool.h @@ -30,7 +30,7 @@ class NET_EXPORT_PRIVATE SOCKSSocketParams public: SOCKSSocketParams(const scoped_refptr<TransportSocketParams>& proxy_server, bool socks_v5, const HostPortPair& host_port_pair, - RequestPriority priority, const GURL& referrer); + RequestPriority priority); const scoped_refptr<TransportSocketParams>& transport_params() const { return transport_params_; diff --git a/net/socket/socks_client_socket_pool_unittest.cc b/net/socket/socks_client_socket_pool_unittest.cc index b3658c9..148cb5b 100644 --- a/net/socket/socks_client_socket_pool_unittest.cc +++ b/net/socket/socks_client_socket_pool_unittest.cc @@ -54,7 +54,7 @@ class SOCKSClientSocketPoolTest : public testing::Test { SOCKSClientSocketPoolTest() : ignored_transport_socket_params_(new TransportSocketParams( - HostPortPair("proxy", 80), MEDIUM, GURL(), false, false)), + HostPortPair("proxy", 80), MEDIUM, false, false)), transport_histograms_("MockTCP"), transport_socket_pool_( kMaxSockets, kMaxSocketsPerGroup, @@ -62,7 +62,7 @@ class SOCKSClientSocketPoolTest : public testing::Test { &transport_client_socket_factory_), ignored_socket_params_(new SOCKSSocketParams( ignored_transport_socket_params_, true, HostPortPair("host", 80), - MEDIUM, GURL())), + MEDIUM)), socks_histograms_("SOCKSUnitTest"), pool_(kMaxSockets, kMaxSocketsPerGroup, &socks_histograms_, diff --git a/net/socket/ssl_client_socket_pool_unittest.cc b/net/socket/ssl_client_socket_pool_unittest.cc index b78297c..e0bca7c 100644 --- a/net/socket/ssl_client_socket_pool_unittest.cc +++ b/net/socket/ssl_client_socket_pool_unittest.cc @@ -47,7 +47,7 @@ class SSLClientSocketPoolTest : public testing::Test { &host_resolver_)), session_(CreateNetworkSession()), direct_transport_socket_params_(new TransportSocketParams( - HostPortPair("host", 443), MEDIUM, GURL(), false, false)), + HostPortPair("host", 443), MEDIUM, false, false)), transport_histograms_("MockTCP"), transport_socket_pool_( kMaxSockets, @@ -55,10 +55,10 @@ class SSLClientSocketPoolTest : public testing::Test { &transport_histograms_, &socket_factory_), proxy_transport_socket_params_(new TransportSocketParams( - HostPortPair("proxy", 443), MEDIUM, GURL(), false, false)), + HostPortPair("proxy", 443), MEDIUM, false, false)), socks_socket_params_(new SOCKSSocketParams( proxy_transport_socket_params_, true, - HostPortPair("sockshost", 443), MEDIUM, GURL())), + HostPortPair("sockshost", 443), MEDIUM)), socks_histograms_("MockSOCKS"), socks_socket_pool_( kMaxSockets, diff --git a/net/socket/transport_client_socket_pool.cc b/net/socket/transport_client_socket_pool.cc index 43276dc..803e9e9 100644 --- a/net/socket/transport_client_socket_pool.cc +++ b/net/socket/transport_client_socket_pool.cc @@ -61,18 +61,15 @@ bool AddressListOnlyContainsIPv6Addresses(const AddressList& addrlist) { TransportSocketParams::TransportSocketParams( const HostPortPair& host_port_pair, RequestPriority priority, - const GURL& referrer, bool disable_resolver_cache, bool ignore_limits) : destination_(host_port_pair), ignore_limits_(ignore_limits) { - Initialize(priority, referrer, disable_resolver_cache); + Initialize(priority, disable_resolver_cache); } TransportSocketParams::~TransportSocketParams() {} -// TODO(szym): remove unneeded referrer void TransportSocketParams::Initialize(RequestPriority priority, - const GURL& referrer, bool disable_resolver_cache) { destination_.set_priority(priority); if (disable_resolver_cache) diff --git a/net/socket/transport_client_socket_pool.h b/net/socket/transport_client_socket_pool.h index 3addf33..e343371b 100644 --- a/net/socket/transport_client_socket_pool.h +++ b/net/socket/transport_client_socket_pool.h @@ -29,7 +29,6 @@ class NET_EXPORT_PRIVATE TransportSocketParams public: TransportSocketParams(const HostPortPair& host_port_pair, RequestPriority priority, - const GURL& referrer, bool disable_resolver_cache, bool ignore_limits); @@ -40,8 +39,7 @@ class NET_EXPORT_PRIVATE TransportSocketParams friend class base::RefCounted<TransportSocketParams>; ~TransportSocketParams(); - void Initialize(RequestPriority priority, const GURL& referrer, - bool disable_resolver_cache); + void Initialize(RequestPriority priority, bool disable_resolver_cache); HostResolver::RequestInfo destination_; bool ignore_limits_; diff --git a/net/socket/transport_client_socket_pool_unittest.cc b/net/socket/transport_client_socket_pool_unittest.cc index 236adcd..5a61d00 100644 --- a/net/socket/transport_client_socket_pool_unittest.cc +++ b/net/socket/transport_client_socket_pool_unittest.cc @@ -365,10 +365,10 @@ class TransportClientSocketPoolTest : public testing::Test { ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled(true)), params_( new TransportSocketParams(HostPortPair("www.google.com", 80), - kDefaultPriority, GURL(), false, false)), + kDefaultPriority, false, false)), low_params_( new TransportSocketParams(HostPortPair("www.google.com", 80), - LOW, GURL(), false, false)), + LOW, false, false)), histograms_(new ClientSocketPoolHistograms("TCPUnitTest")), host_resolver_(new MockHostResolver), pool_(kMaxSockets, @@ -386,7 +386,7 @@ class TransportClientSocketPoolTest : public testing::Test { int StartRequest(const std::string& group_name, RequestPriority priority) { scoped_refptr<TransportSocketParams> params(new TransportSocketParams( - HostPortPair("www.google.com", 80), MEDIUM, GURL(), false, false)); + HostPortPair("www.google.com", 80), MEDIUM, false, false)); return test_base_.StartRequestUsingPool( &pool_, group_name, priority, params); } @@ -520,7 +520,7 @@ TEST_F(TransportClientSocketPoolTest, InitHostResolutionFailure) { ClientSocketHandle handle; HostPortPair host_port_pair("unresolvable.host.name", 80); scoped_refptr<TransportSocketParams> dest(new TransportSocketParams( - host_port_pair, kDefaultPriority, GURL(), false, false)); + host_port_pair, kDefaultPriority, false, false)); EXPECT_EQ(ERR_IO_PENDING, handle.Init("a", dest, kDefaultPriority, &callback, &pool_, BoundNetLog())); @@ -780,7 +780,7 @@ class RequestSocketCallback : public CallbackRunner< Tuple1<int> > { } within_callback_ = true; scoped_refptr<TransportSocketParams> dest(new TransportSocketParams( - HostPortPair("www.google.com", 80), LOWEST, GURL(), false, false)); + HostPortPair("www.google.com", 80), LOWEST, false, false)); int rv = handle_->Init("a", dest, LOWEST, this, pool_, BoundNetLog()); EXPECT_EQ(OK, rv); } @@ -801,7 +801,7 @@ TEST_F(TransportClientSocketPoolTest, RequestTwice) { ClientSocketHandle handle; RequestSocketCallback callback(&handle, &pool_); scoped_refptr<TransportSocketParams> dest(new TransportSocketParams( - HostPortPair("www.google.com", 80), LOWEST, GURL(), false, false)); + HostPortPair("www.google.com", 80), LOWEST, false, false)); int rv = handle.Init("a", dest, LOWEST, &callback, &pool_, BoundNetLog()); ASSERT_EQ(ERR_IO_PENDING, rv); |