summaryrefslogtreecommitdiffstats
path: root/net/spdy
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-20 18:44:10 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-20 18:44:10 +0000
commit5109c195858cdf87ec9fd22aeac8ffc7f0bfc5a3 (patch)
tree178118ff3f421ecaf2c72bdec51a8a084ea28f57 /net/spdy
parent5c2c77944f290e7f80ba8e15e6ec0c4e1c42dafa (diff)
downloadchromium_src-5109c195858cdf87ec9fd22aeac8ffc7f0bfc5a3.zip
chromium_src-5109c195858cdf87ec9fd22aeac8ffc7f0bfc5a3.tar.gz
chromium_src-5109c195858cdf87ec9fd22aeac8ffc7f0bfc5a3.tar.bz2
Remove HostResolver::RequestInfo's priority parameter
Make it part of the HostResolver::Resolve() call instead. This makes it possible for RequestInfo to remain constant for the lifetime of a request. This also has the nice side effect for not needing to pass a priority for ResolveFromCache() calls. BUG=166689 TBR=asargent@chromium.org, mmenke@chromium.org, sergeyu@chromium.org Review URL: https://codereview.chromium.org/22824022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218525 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy')
-rw-r--r--net/spdy/spdy_session_pool.cc3
-rw-r--r--net/spdy/spdy_session_pool_unittest.cc4
-rw-r--r--net/spdy/spdy_session_unittest.cc10
3 files changed, 10 insertions, 7 deletions
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
index 80f10ed..9e47f3f 100644
--- a/net/spdy/spdy_session_pool.cc
+++ b/net/spdy/spdy_session_pool.cc
@@ -163,8 +163,7 @@ base::WeakPtr<SpdySession> SpdySessionPool::FindAvailableSession(
return base::WeakPtr<SpdySession>();
// Look up the key's from the resolver's cache.
- net::HostResolver::RequestInfo resolve_info(key.host_port_pair(),
- DEFAULT_PRIORITY);
+ net::HostResolver::RequestInfo resolve_info(key.host_port_pair());
AddressList addresses;
int rv = resolver_->ResolveFromCache(resolve_info, &addresses, net_log);
DCHECK_NE(rv, ERR_IO_PENDING);
diff --git a/net/spdy/spdy_session_pool_unittest.cc b/net/spdy/spdy_session_pool_unittest.cc
index 9e10ed22..3368875 100644
--- a/net/spdy/spdy_session_pool_unittest.cc
+++ b/net/spdy/spdy_session_pool_unittest.cc
@@ -336,9 +336,9 @@ void SpdySessionPoolTest::RunIPPoolingTest(
// This test requires that the HostResolver cache be populated. Normal
// code would have done this already, but we do it manually.
- HostResolver::RequestInfo info(HostPortPair(test_hosts[i].name, kTestPort),
- DEFAULT_PRIORITY);
+ HostResolver::RequestInfo info(HostPortPair(test_hosts[i].name, kTestPort));
session_deps_.host_resolver->Resolve(info,
+ DEFAULT_PRIORITY,
&test_hosts[i].addresses,
CompletionCallback(),
NULL,
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
index d1addb5..575ebf2 100644
--- a/net/spdy/spdy_session_unittest.cc
+++ b/net/spdy/spdy_session_unittest.cc
@@ -2817,12 +2817,16 @@ TEST_P(SpdySessionTest, CloseOneIdleConnectionWithAlias) {
// Set up an alias for the idle SPDY session, increasing its ref count to 2.
SpdySessionKey key2(HostPortPair("2.com", 80), ProxyServer::Direct(),
kPrivacyModeDisabled);
- HostResolver::RequestInfo info(key2.host_port_pair(), DEFAULT_PRIORITY);
+ HostResolver::RequestInfo info(key2.host_port_pair());
AddressList addresses;
// Pre-populate the DNS cache, since a synchronous resolution is required in
// order to create the alias.
- session_deps_.host_resolver->Resolve(
- info, &addresses, CompletionCallback(), NULL, BoundNetLog());
+ session_deps_.host_resolver->Resolve(info,
+ DEFAULT_PRIORITY,
+ &addresses,
+ CompletionCallback(),
+ NULL,
+ BoundNetLog());
// Get a session for |key2|, which should return the session created earlier.
base::WeakPtr<SpdySession> session2 =
spdy_session_pool_->FindAvailableSession(key2, BoundNetLog());