From eb19dd80c9487e313acfd736a06695e1832c289b Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Tue, 14 Sep 2010 00:18:11 +0000 Subject: Fix a ChromeFrame crash which occurs while uploading UMA data. We use Chrome's http stack in ChromeFrame to upload this data. The crash occurs in the HttpAuthHandlerNegotiate code while attempting to perform a DNS resolution with a null HostResolver pointer. Fix is to use the net::HttpAuthHandlerRegistryFactory::Create function to create the AuthHandler factory as this function takes in the host resolver as an argument. Fixes bug http://code.google.com/p/chromium/issues/detail?id=55467 Bug=55467 Review URL: http://codereview.chromium.org/3328023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59310 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome_frame/metrics_service.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/chrome_frame/metrics_service.cc b/chrome_frame/metrics_service.cc index 8307685..37bff5c 100644 --- a/chrome_frame/metrics_service.cc +++ b/chrome_frame/metrics_service.cc @@ -128,7 +128,18 @@ class ChromeFrameUploadRequestContext : public URLRequestContext { DCHECK(proxy_service_); ssl_config_service_ = new net::SSLConfigServiceDefaults; - http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault(); + + url_security_manager_.reset( + net::URLSecurityManager::Create(NULL, NULL)); + + std::string csv_auth_schemes = "basic,digest,ntlm,negotiate"; + std::vector supported_schemes; + SplitString(csv_auth_schemes, ',', &supported_schemes); + + http_auth_handler_factory_ = net::HttpAuthHandlerRegistryFactory::Create( + supported_schemes, url_security_manager_.get(), host_resolver_, false, + false); + http_transaction_factory_ = new net::HttpCache( net::HttpNetworkLayer::CreateFactory(host_resolver_, proxy_service_, @@ -147,6 +158,7 @@ class ChromeFrameUploadRequestContext : public URLRequestContext { std::string user_agent_; MessageLoop* io_loop_; scoped_ptr net_log_; + scoped_ptr url_security_manager_; }; // This class provides an interface to retrieve the URL request context for -- cgit v1.1