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

Unified Diff: net/http/http_auth_handler_mock.cc

Issue 3360017: Fix multi-round authentication.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: SocketStream fix Created 10 years, 3 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_handler_mock.h ('k') | net/http/http_auth_handler_negotiate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler_mock.cc
===================================================================
--- net/http/http_auth_handler_mock.cc (revision 59119)
+++ net/http/http_auth_handler_mock.cc (working copy)
@@ -5,6 +5,7 @@
#include "net/http/http_auth_handler_mock.h"
#include "base/message_loop.h"
+#include "base/string_util.h"
#include "net/base/net_errors.h"
#include "net/http/http_request_info.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -77,6 +78,16 @@
return true;
}
+HttpAuth::AuthorizationResult HttpAuthHandlerMock::HandleAnotherChallenge(
+ HttpAuth::ChallengeTokenizer* challenge) {
+ if (!is_connection_based())
+ return HttpAuth::AUTHORIZATION_RESULT_REJECT;
+ if (!challenge->valid() ||
+ !LowerCaseEqualsASCII(challenge->scheme(), "mock"))
+ return HttpAuth::AUTHORIZATION_RESULT_INVALID;
+ return HttpAuth::AUTHORIZATION_RESULT_ACCEPT;
+}
+
int HttpAuthHandlerMock::GenerateAuthTokenImpl(const string16* username,
const string16* password,
const HttpRequestInfo* request,
« no previous file with comments | « net/http/http_auth_handler_mock.h ('k') | net/http/http_auth_handler_negotiate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698