| Index: net/http/http_auth.cc
|
| diff --git a/net/http/http_auth.cc b/net/http/http_auth.cc
|
| index 47a13be28b6b931786c365178260676f09666fa6..bbfaf4beac01be5dea8939f91509c848bafa4086 100644
|
| --- a/net/http/http_auth.cc
|
| +++ b/net/http/http_auth.cc
|
| @@ -25,7 +25,7 @@ void HttpAuth::ChooseBestChallenge(
|
| const HttpResponseHeaders* headers,
|
| Target target,
|
| const GURL& origin,
|
| - const std::set<Scheme>& disabled_schemes,
|
| + const std::set<std::string>& disabled_schemes,
|
| const BoundNetLog& net_log,
|
| scoped_ptr<HttpAuthHandler>* handler) {
|
| DCHECK(http_auth_handler_factory);
|
| @@ -57,16 +57,15 @@ HttpAuth::AuthorizationResult HttpAuth::HandleChallengeResponse(
|
| HttpAuthHandler* handler,
|
| const HttpResponseHeaders* headers,
|
| Target target,
|
| - const std::set<Scheme>& disabled_schemes,
|
| + const std::set<std::string>& disabled_schemes,
|
| std::string* challenge_used) {
|
| DCHECK(handler);
|
| DCHECK(headers);
|
| DCHECK(challenge_used);
|
| challenge_used->clear();
|
| - HttpAuth::Scheme current_scheme = handler->auth_scheme();
|
| + std::string current_scheme = handler->auth_scheme();
|
| if (disabled_schemes.find(current_scheme) != disabled_schemes.end())
|
| return HttpAuth::AUTHORIZATION_RESULT_REJECT;
|
| - std::string current_scheme_name = SchemeToString(current_scheme);
|
| const std::string header_name = GetChallengeHeaderName(target);
|
| void* iter = NULL;
|
| std::string challenge;
|
| @@ -74,7 +73,7 @@ HttpAuth::AuthorizationResult HttpAuth::HandleChallengeResponse(
|
| HttpAuth::AUTHORIZATION_RESULT_INVALID;
|
| while (headers->EnumerateHeader(&iter, header_name, &challenge)) {
|
| HttpAuth::ChallengeTokenizer props(challenge.begin(), challenge.end());
|
| - if (!LowerCaseEqualsASCII(props.scheme(), current_scheme_name.c_str()))
|
| + if (!LowerCaseEqualsASCII(props.scheme(), current_scheme.c_str()))
|
| continue;
|
| authorization_result = handler->HandleAnotherChallenge(&props);
|
| if (authorization_result != HttpAuth::AUTHORIZATION_RESULT_INVALID) {
|
| @@ -175,22 +174,4 @@ std::string HttpAuth::GetAuthTargetString(Target target) {
|
| }
|
| }
|
|
|
| -// static
|
| -const char* HttpAuth::SchemeToString(Scheme scheme) {
|
| - static const char* const kSchemeNames[] = {
|
| - "basic",
|
| - "digest",
|
| - "ntlm",
|
| - "negotiate",
|
| - "mock",
|
| - };
|
| - COMPILE_ASSERT(arraysize(kSchemeNames) == AUTH_SCHEME_MAX,
|
| - http_auth_scheme_names_incorrect_size);
|
| - if (scheme < AUTH_SCHEME_BASIC || scheme >= AUTH_SCHEME_MAX) {
|
| - NOTREACHED();
|
| - return "invalid_scheme";
|
| - }
|
| - return kSchemeNames[scheme];
|
| -}
|
| -
|
| } // namespace net
|
|
|