| Index: net/http/http_auth_handler.cc
|
| diff --git a/net/http/http_auth_handler.cc b/net/http/http_auth_handler.cc
|
| index 2185e4f7dad8b43b3cd875e1527d6189e724c68a..32028c247d159bd5bbc24ac3b7cc1f0064f2649f 100644
|
| --- a/net/http/http_auth_handler.cc
|
| +++ b/net/http/http_auth_handler.cc
|
| @@ -18,8 +18,8 @@ HttpAuthHandler::HttpAuthHandler() : target_(HttpAuth::AUTH_NONE) {}
|
| HttpAuthHandler::~HttpAuthHandler() {
|
| }
|
|
|
| -bool HttpAuthHandler::InitFromChallenge(
|
| - HttpAuthChallengeTokenizer* challenge,
|
| +int HttpAuthHandler::HandleInitialChallenge(
|
| + const HttpAuthChallengeTokenizer& challenge,
|
| HttpAuth::Target target,
|
| const GURL& origin,
|
| const BoundNetLog& net_log) {
|
| @@ -27,15 +27,14 @@ bool HttpAuthHandler::InitFromChallenge(
|
| target_ = target;
|
| net_log_ = net_log;
|
|
|
| - auth_challenge_ = challenge->challenge_text();
|
| - bool ok = Init(challenge);
|
| + auth_challenge_ = challenge.challenge_text();
|
| + int result = Init(challenge);
|
|
|
| - // Init() is expected to set the scheme, realm, and properties. The realm may
|
| - // be empty.
|
| - DCHECK_IMPLIES(ok,
|
| - HttpUtil::IsToken(auth_scheme_.begin(), auth_scheme_.end()) &&
|
| - base::ToLowerASCII(auth_scheme_) == auth_scheme_);
|
| - return ok;
|
| + // Init() is expected to set the scheme, realm, score, and properties. The
|
| + // realm may be empty.
|
| + DCHECK_IMPLIES(result == OK, HttpAuth::IsValidNormalizedScheme(auth_scheme_));
|
| +
|
| + return result;
|
| }
|
|
|
| namespace {
|
| @@ -54,11 +53,11 @@ NetLog::EventType EventTypeFromAuthTarget(HttpAuth::Target target) {
|
|
|
| } // namespace
|
|
|
| -int HttpAuthHandler::GenerateAuthToken(
|
| - const AuthCredentials* credentials, const HttpRequestInfo* request,
|
| - const CompletionCallback& callback, std::string* auth_token) {
|
| +int HttpAuthHandler::GenerateAuthToken(const AuthCredentials* credentials,
|
| + const HttpRequestInfo& request,
|
| + const CompletionCallback& callback,
|
| + std::string* auth_token) {
|
| DCHECK(!callback.is_null());
|
| - DCHECK(request);
|
| DCHECK(credentials != NULL || AllowsDefaultCredentials());
|
| DCHECK(auth_token != NULL);
|
| DCHECK(callback_.is_null());
|
|
|