summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-14 20:35:15 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-14 20:35:15 +0000
commit182fe2f459b174b9c1de6520776ceb23f7d0f0de (patch)
tree8d8592387f02940866515447134ed83674b7834e /chrome_frame
parent6c2f7320e7767f71385134b184c2e0652600b5c0 (diff)
downloadchromium_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 'chrome_frame')
-rw-r--r--chrome_frame/metrics_service.cc42
1 files changed, 21 insertions, 21 deletions
diff --git a/chrome_frame/metrics_service.cc b/chrome_frame/metrics_service.cc
index a1242cb..706b591 100644
--- a/chrome_frame/metrics_service.cc
+++ b/chrome_frame/metrics_service.cc
@@ -142,10 +142,10 @@ class ChromeFrameUploadRequestContext : public net::URLRequestContext {
~ChromeFrameUploadRequestContext() {
DVLOG(1) << __FUNCTION__;
- 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_;
}
void Initialize() {
@@ -153,19 +153,19 @@ class ChromeFrameUploadRequestContext : public net::URLRequestContext {
user_agent_ = http_utils::AddChromeFrameToUserAgentValue(
user_agent_);
- set_host_resolver(
+ host_resolver_ =
net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism,
- NULL, NULL));
- set_cert_verifier(new net::CertVerifier);
+ NULL, NULL);
+ cert_verifier_ = new net::CertVerifier;
net::ProxyConfigService* proxy_config_service =
net::ProxyService::CreateSystemProxyConfigService(NULL, NULL);
DCHECK(proxy_config_service);
- set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver(
- proxy_config_service, 0, NULL));
- DCHECK(proxy_service());
+ proxy_service_ = net::ProxyService::CreateUsingSystemProxyResolver(
+ proxy_config_service, 0, NULL);
+ DCHECK(proxy_service_);
- set_ssl_config_service(new net::SSLConfigServiceDefaults);
+ ssl_config_service_ = new net::SSLConfigServiceDefaults;
url_security_manager_.reset(
net::URLSecurityManager::Create(NULL, NULL));
@@ -174,23 +174,23 @@ class ChromeFrameUploadRequestContext : public net::URLRequestContext {
std::vector<std::string> supported_schemes;
base::SplitString(csv_auth_schemes, ',', &supported_schemes);
- set_http_auth_handler_factory(net::HttpAuthHandlerRegistryFactory::Create(
- supported_schemes, url_security_manager_.get(), host_resolver(),
- std::string(), false, false));
+ http_auth_handler_factory_ = net::HttpAuthHandlerRegistryFactory::Create(
+ supported_schemes, url_security_manager_.get(), host_resolver_,
+ std::string(), false, false);
net::HttpNetworkSession::Params session_params;
- session_params.host_resolver = host_resolver();
- session_params.cert_verifier = cert_verifier();
- session_params.proxy_service = proxy_service();
+ session_params.host_resolver = host_resolver_;
+ session_params.cert_verifier = cert_verifier_;
+ session_params.proxy_service = proxy_service_;
session_params.http_auth_handler_factory =
- http_auth_handler_factory();
- session_params.ssl_config_service = ssl_config_service();
+ http_auth_handler_factory_;
+ session_params.ssl_config_service = ssl_config_service_;
scoped_refptr<net::HttpNetworkSession> network_session =
new net::HttpNetworkSession(session_params);
- set_http_transaction_factory(new net::HttpCache(
+ http_transaction_factory_ = new net::HttpCache(
network_session,
- net::HttpCache::DefaultBackend::InMemory(0)));
+ net::HttpCache::DefaultBackend::InMemory(0));
}
virtual const std::string& GetUserAgent(const GURL& url) const {