summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_test_util.h
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 16:22:01 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 16:22:01 +0000
commit4d6a6d9441faebcb32e47a7e834b265d11227397 (patch)
treeb2e3099b325e6eea30bab129d2b23dfc2dc6cefd /net/spdy/spdy_test_util.h
parentfd7d031f16191a9c6d626a76dd704baf92df9a7a (diff)
downloadchromium_src-4d6a6d9441faebcb32e47a7e834b265d11227397.zip
chromium_src-4d6a6d9441faebcb32e47a7e834b265d11227397.tar.gz
chromium_src-4d6a6d9441faebcb32e47a7e834b265d11227397.tar.bz2
Revert 60791 - HttpAuthHandlerFactory::CreateDefault requires a HostResolver argument.
Previously the default registry factory would crash if it saw a Negotiate header when trying to do a CNAME lookup because of a NULL resolver. Since then I've changed HttpAuthHandlerNegotiate to skip the CNAME lookup step when the resolver_ is NULL. So, one option is to make CreateDefault accept an optional HostResolver argument. My concern is that since passing in NULL is the easier choice, people will do it and encounter user problems when going through a Negotiate proxy. Hence, I force the correct behavior. BUG=56819 TEST=net_unittests, try fetch client through a Negotiate authenticating proxy. Review URL: http://codereview.chromium.org/3447027 TBR=cbentzel@chromium.org Review URL: http://codereview.chromium.org/3413039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60795 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_test_util.h')
-rw-r--r--net/spdy/spdy_test_util.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/net/spdy/spdy_test_util.h b/net/spdy/spdy_test_util.h
index be2f7d0..c30cb5c 100644
--- a/net/spdy/spdy_test_util.h
+++ b/net/spdy/spdy_test_util.h
@@ -248,6 +248,7 @@ spdy::SpdyFrame* ConstructSpdyGetSynReply(const char* const extra_headers[],
// Returns a SpdyFrame.
spdy::SpdyFrame* ConstructSpdyGetSynReplyRedirect(int stream_id);
+
// Constructs a standard SPDY POST SYN packet.
// |extra_headers| are the extra header-value pairs, which typically
// will vary the most between calls.
@@ -303,8 +304,7 @@ class SpdySessionDependencies {
ssl_config_service(new SSLConfigServiceDefaults),
socket_factory(new MockClientSocketFactory),
deterministic_socket_factory(new DeterministicMockClientSocketFactory),
- http_auth_handler_factory(
- HttpAuthHandlerFactory::CreateDefault(host_resolver)),
+ http_auth_handler_factory(HttpAuthHandlerFactory::CreateDefault()),
spdy_session_pool(new SpdySessionPool(NULL)) {
// Note: The CancelledTransaction test does cleanup by running all
// tasks in the message loop (RunAllPending). Unfortunately, that
@@ -322,11 +322,9 @@ class SpdySessionDependencies {
ssl_config_service(new SSLConfigServiceDefaults),
socket_factory(new MockClientSocketFactory),
deterministic_socket_factory(new DeterministicMockClientSocketFactory),
- http_auth_handler_factory(
- HttpAuthHandlerFactory::CreateDefault(host_resolver)),
+ http_auth_handler_factory(HttpAuthHandlerFactory::CreateDefault()),
spdy_session_pool(new SpdySessionPool(NULL)) {}
- // NOTE: host_resolver must be ordered before http_auth_handler_factory.
scoped_refptr<MockHostResolverBase> host_resolver;
scoped_refptr<ProxyService> proxy_service;
scoped_refptr<SSLConfigService> ssl_config_service;
@@ -367,8 +365,7 @@ class SpdyURLRequestContext : public URLRequestContext {
proxy_service_ = ProxyService::CreateDirect();
spdy_session_pool_ = new SpdySessionPool(NULL);
ssl_config_service_ = new SSLConfigServiceDefaults;
- http_auth_handler_factory_ = HttpAuthHandlerFactory::CreateDefault(
- host_resolver_);
+ http_auth_handler_factory_ = HttpAuthHandlerFactory::CreateDefault();
http_transaction_factory_ = new net::HttpCache(
new HttpNetworkLayer(&socket_factory_,
host_resolver_,