diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-14 00:18:11 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-14 00:18:11 +0000 |
commit | eb19dd80c9487e313acfd736a06695e1832c289b (patch) | |
tree | 0d91fd3f3d8578e193d4b2c8de7ce3b47e5c48f4 /chrome_frame/metrics_service.cc | |
parent | 845e795cff3c6fdc2202f559ee3f1e899f4d101c (diff) | |
download | chromium_src-eb19dd80c9487e313acfd736a06695e1832c289b.zip chromium_src-eb19dd80c9487e313acfd736a06695e1832c289b.tar.gz chromium_src-eb19dd80c9487e313acfd736a06695e1832c289b.tar.bz2 |
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
Diffstat (limited to 'chrome_frame/metrics_service.cc')
-rw-r--r-- | chrome_frame/metrics_service.cc | 14 |
1 files changed, 13 insertions, 1 deletions
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<std::string> 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::NetLog> net_log_; + scoped_ptr<net::URLSecurityManager> url_security_manager_; }; // This class provides an interface to retrieve the URL request context for |