summaryrefslogtreecommitdiffstats
path: root/net/http/http_auth_handler_mock.h
diff options
context:
space:
mode:
authorasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-31 14:07:08 +0000
committerasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-31 14:07:08 +0000
commit26d84b0594fd08b9b748787a551a14722dc754f9 (patch)
tree9f189304abea641b632102cf524e67653581adef /net/http/http_auth_handler_mock.h
parent2b8cf90084f83ee5901caeeb84bd5bc9e620f31f (diff)
downloadchromium_src-26d84b0594fd08b9b748787a551a14722dc754f9.zip
chromium_src-26d84b0594fd08b9b748787a551a14722dc754f9.tar.gz
chromium_src-26d84b0594fd08b9b748787a551a14722dc754f9.tar.bz2
Don't try to use explicit credentials with schemes that don't support it.
BUG=94617 TEST=net_unittests --gtest_filter=HttpAuthControllerTest.NoExplicitCredentialsAllowed. Review URL: http://codereview.chromium.org/7748033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98965 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_auth_handler_mock.h')
-rw-r--r--net/http/http_auth_handler_mock.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/net/http/http_auth_handler_mock.h b/net/http/http_auth_handler_mock.h
index e7d5997..1406239 100644
--- a/net/http/http_auth_handler_mock.h
+++ b/net/http/http_auth_handler_mock.h
@@ -75,14 +75,24 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
connection_based_ = connection_based;
}
+ void set_allows_default_credentials(bool allows_default_credentials) {
+ allows_default_credentials_ = allows_default_credentials;
+ }
+
+ void set_allows_explicit_credentials(bool allows_explicit_credentials) {
+ allows_explicit_credentials_ = allows_explicit_credentials;
+ }
+
const GURL& request_url() const {
return request_url_;
}
// HttpAuthHandler:
virtual HttpAuth::AuthorizationResult HandleAnotherChallenge(
- HttpAuth::ChallengeTokenizer* challenge);
- virtual bool NeedsIdentity();
+ HttpAuth::ChallengeTokenizer* challenge) OVERRIDE;
+ virtual bool NeedsIdentity() OVERRIDE;
+ virtual bool AllowsDefaultCredentials() OVERRIDE;
+ virtual bool AllowsExplicitCredentials() OVERRIDE;
protected:
virtual bool Init(HttpAuth::ChallengeTokenizer* challenge);
@@ -106,6 +116,8 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
std::string* auth_token_;
bool first_round_;
bool connection_based_;
+ bool allows_default_credentials_;
+ bool allows_explicit_credentials_;
GURL request_url_;
};