From d56aef7f55220a0654655c691e5adcc1a1dd0cd8 Mon Sep 17 00:00:00 2001 From: "willchan@chromium.org" Date: Fri, 11 Feb 2011 05:18:59 +0000 Subject: Revert 74561 for breaking the ChromeOS build Introduce OffTheRecordProfileIOData and ProfileImplIOData. They both inherit from ProfileIOData. The former is for the off the record (incognito) profile. The latter is for the normal ProfileImpl profile. All of the IO related Profile objects are now initialized at the same time, in the subtype implementations of ProfileIOData::LazyInitializeInternal(). I also took this opportunity to clean URLRequestContext up so it is a class and keeps its member variables private. This required touching a fair number of files. TODO: Remove lots of the refcounting of member variables, since they can now be owned by ProfileIOData. BUG=67237 TEST=none Review URL: http://codereview.chromium.org/6286133 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/6489020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74564 0039d316-1c4b-4281-b951-d872f2087c98 --- net/proxy/proxy_script_fetcher_impl_unittest.cc | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'net/proxy') 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 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_; } }; -- cgit v1.1