diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-14 20:35:15 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-14 20:35:15 +0000 |
commit | 182fe2f459b174b9c1de6520776ceb23f7d0f0de (patch) | |
tree | 8d8592387f02940866515447134ed83674b7834e /net/proxy | |
parent | 6c2f7320e7767f71385134b184c2e0652600b5c0 (diff) | |
download | chromium_src-182fe2f459b174b9c1de6520776ceb23f7d0f0de.zip chromium_src-182fe2f459b174b9c1de6520776ceb23f7d0f0de.tar.gz chromium_src-182fe2f459b174b9c1de6520776ceb23f7d0f0de.tar.bz2 |
Revert 74842 - It seems to have broken the ChromeOS "PFQ bot"?
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
TBR=willchan@chromium.org
Review URL: http://codereview.chromium.org/6517021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74848 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy')
-rw-r--r-- | net/proxy/proxy_script_fetcher_impl_unittest.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/net/proxy/proxy_script_fetcher_impl_unittest.cc b/net/proxy/proxy_script_fetcher_impl_unittest.cc index e0f0c906..ce92986 100644 --- a/net/proxy/proxy_script_fetcher_impl_unittest.cc +++ b/net/proxy/proxy_script_fetcher_impl_unittest.cc @@ -41,30 +41,30 @@ class RequestContext : public URLRequestContext { public: RequestContext() { ProxyConfig no_proxy; - set_host_resolver( + host_resolver_ = CreateSystemHostResolver(HostResolver::kDefaultParallelism, - NULL, NULL)); - set_cert_verifier(new CertVerifier); - set_proxy_service(ProxyService::CreateFixed(no_proxy)); - set_ssl_config_service(new SSLConfigServiceDefaults); + NULL, NULL); + cert_verifier_ = new CertVerifier; + proxy_service_ = ProxyService::CreateFixed(no_proxy); + ssl_config_service_ = new SSLConfigServiceDefaults; HttpNetworkSession::Params params; - params.host_resolver = host_resolver(); - params.cert_verifier = cert_verifier(); - params.proxy_service = proxy_service(); - params.ssl_config_service = ssl_config_service(); + params.host_resolver = host_resolver_; + params.cert_verifier = cert_verifier_; + params.proxy_service = proxy_service_; + params.ssl_config_service = ssl_config_service_; scoped_refptr<HttpNetworkSession> network_session( new HttpNetworkSession(params)); - set_http_transaction_factory(new HttpCache( + http_transaction_factory_ = new HttpCache( network_session, - HttpCache::DefaultBackend::InMemory(0))); + HttpCache::DefaultBackend::InMemory(0)); } private: ~RequestContext() { - delete http_transaction_factory(); - delete cert_verifier(); - delete host_resolver(); + delete http_transaction_factory_; + delete cert_verifier_; + delete host_resolver_; } }; |