Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1290)

Unified Diff: net/http/http_auth.cc

Issue 242135: Merge r25564 and r26588 from the trunk.... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Undo an extraneous comment change Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_auth.h ('k') | net/http/http_auth_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth.cc
===================================================================
--- net/http/http_auth.cc (revision 28069)
+++ net/http/http_auth.cc (working copy)
@@ -19,6 +19,7 @@
// static
void HttpAuth::ChooseBestChallenge(const HttpResponseHeaders* headers,
Target target,
+ const GURL& origin,
scoped_refptr<HttpAuthHandler>* handler) {
// A connection-based authentication scheme must continue to use the
// existing handler object in |*handler|.
@@ -30,7 +31,7 @@
ChallengeTokenizer props(challenge.begin(), challenge.end());
if (LowerCaseEqualsASCII(props.scheme(), (*handler)->scheme().c_str()) &&
(*handler)->InitFromChallenge(challenge.begin(), challenge.end(),
- target))
+ target, origin))
return;
}
}
@@ -42,7 +43,7 @@
void* iter = NULL;
while (headers->EnumerateHeader(&iter, header_name, &cur_challenge)) {
scoped_refptr<HttpAuthHandler> cur;
- CreateAuthHandler(cur_challenge, target, &cur);
+ CreateAuthHandler(cur_challenge, target, origin, &cur);
if (cur && (!best || best->score() < cur->score()))
best.swap(cur);
}
@@ -52,6 +53,7 @@
// static
void HttpAuth::CreateAuthHandler(const std::string& challenge,
Target target,
+ const GURL& origin,
scoped_refptr<HttpAuthHandler>* handler) {
// Find the right auth handler for the challenge's scheme.
ChallengeTokenizer props(challenge.begin(), challenge.end());
@@ -70,7 +72,7 @@
}
if (tmp_handler) {
if (!tmp_handler->InitFromChallenge(challenge.begin(), challenge.end(),
- target)) {
+ target, origin)) {
// Invalid/unsupported challenge.
tmp_handler = NULL;
}
« no previous file with comments | « net/http/http_auth.h ('k') | net/http/http_auth_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698