summaryrefslogtreecommitdiffstats
path: root/net/spdy
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-14 19:43:39 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-14 19:43:39 +0000
commita8940f59fdf059ea999792c2782d1c899c95a46f (patch)
tree93edc70dff18a7b367ff7825f7a38575721ea3e3 /net/spdy
parent0ef39f07d91f7bff93712f95823e5b4738e6ada1 (diff)
downloadchromium_src-a8940f59fdf059ea999792c2782d1c899c95a46f.zip
chromium_src-a8940f59fdf059ea999792c2782d1c899c95a46f.tar.gz
chromium_src-a8940f59fdf059ea999792c2782d1c899c95a46f.tar.bz2
Revert r74728 which reverted r74561 for exposing a ChromeOS bug.
r74561 added a DCHECK to make sure users didn't try to access the ChromeURLRequestContextGetter from the Profile, since the Profile should only be read on the UI thread. ChromeOS apparently tried to access it from another thread, and therefore hit the new DCHECK. I'm relanding without the DCHECK. I'm also eagerly initializing the off the record context getter to prevent the ChromeOS race. ChromeOS should fix that code so the eager initialization isn't necessary. BUG=none TEST=none Review URL: http://codereview.chromium.org/6484041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74842 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy')
-rw-r--r--net/spdy/spdy_test_util.cc36
1 files changed, 18 insertions, 18 deletions
diff --git a/net/spdy/spdy_test_util.cc b/net/spdy/spdy_test_util.cc
index 5340f22..6342b16 100644
--- a/net/spdy/spdy_test_util.cc
+++ b/net/spdy/spdy_test_util.cc
@@ -914,32 +914,32 @@ HttpNetworkSession* SpdySessionDependencies::SpdyCreateSessionDeterministic(
}
SpdyURLRequestContext::SpdyURLRequestContext() {
- host_resolver_ = new MockHostResolver();
- cert_verifier_ = new CertVerifier;
- proxy_service_ = ProxyService::CreateDirect();
- ssl_config_service_ = new SSLConfigServiceDefaults;
- http_auth_handler_factory_ = HttpAuthHandlerFactory::CreateDefault(
- host_resolver_);
+ set_host_resolver(new MockHostResolver());
+ set_cert_verifier(new CertVerifier);
+ set_proxy_service(ProxyService::CreateDirect());
+ set_ssl_config_service(new SSLConfigServiceDefaults);
+ set_http_auth_handler_factory(HttpAuthHandlerFactory::CreateDefault(
+ host_resolver()));
net::HttpNetworkSession::Params params;
params.client_socket_factory = &socket_factory_;
- params.host_resolver = host_resolver_;
- params.cert_verifier = cert_verifier_;
- params.proxy_service = proxy_service_;
- params.ssl_config_service = ssl_config_service_;
- params.http_auth_handler_factory = http_auth_handler_factory_;
- params.network_delegate = network_delegate_;
+ params.host_resolver = host_resolver();
+ params.cert_verifier = cert_verifier();
+ params.proxy_service = proxy_service();
+ params.ssl_config_service = ssl_config_service();
+ params.http_auth_handler_factory = http_auth_handler_factory();
+ params.network_delegate = network_delegate();
scoped_refptr<HttpNetworkSession> network_session(
new HttpNetworkSession(params));
- http_transaction_factory_ = new HttpCache(
+ set_http_transaction_factory(new HttpCache(
network_session,
- HttpCache::DefaultBackend::InMemory(0));
+ HttpCache::DefaultBackend::InMemory(0)));
}
SpdyURLRequestContext::~SpdyURLRequestContext() {
- delete http_transaction_factory_;
- delete http_auth_handler_factory_;
- delete cert_verifier_;
- delete host_resolver_;
+ delete http_transaction_factory();
+ delete http_auth_handler_factory();
+ delete cert_verifier();
+ delete host_resolver();
}
const SpdyHeaderInfo make_spdy_header(spdy::SpdyControlType type) {