Add support for single sign-on (issue #148).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@166 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2011-01-24 21:24:21 +00:00
parent 4cd63f6d64
commit 8420cbbff1
2 changed files with 17 additions and 1 deletions

View File

@ -103,8 +103,22 @@ void BrowserRequestContext::Init(
cert_verifier_ = new net::CertVerifier;
ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService();
// Add support for single sign-on.
url_security_manager_.reset(net::URLSecurityManager::Create(NULL, NULL));
std::vector<std::string> supported_schemes;
supported_schemes.push_back("basic");
supported_schemes.push_back("digest");
supported_schemes.push_back("ntlm");
supported_schemes.push_back("negotiate");
http_auth_handler_factory_ =
net::HttpAuthHandlerFactory::CreateDefault(host_resolver_);
net::HttpAuthHandlerRegistryFactory::Create(supported_schemes,
url_security_manager_.get(),
host_resolver_,
std::string(),
false,
false);
net::HttpCache::DefaultBackend* backend = new net::HttpCache::DefaultBackend(
cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE,

View File

@ -7,6 +7,7 @@
#define _BROWSER_REQUEST_CONTEXT_H
#include "net/http/http_cache.h"
#include "net/http/url_security_manager.h"
#include "net/url_request/url_request_context.h"
class FilePath;
@ -40,6 +41,7 @@ class BrowserRequestContext : public URLRequestContext {
bool no_proxy);
scoped_ptr<webkit_blob::BlobStorageController> blob_storage_controller_;
scoped_ptr<net::URLSecurityManager> url_security_manager_;
};
#endif // _BROWSER_REQUEST_CONTEXT_H