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

Unified Diff: net/http/http_auth_handler_mock.h

Issue 7748033: Don't try to use explicit credentials with schemes that don't support it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Unit test Created 9 years, 4 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.cc ('k') | net/http/http_auth_handler_mock.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler_mock.h
diff --git a/net/http/http_auth_handler_mock.h b/net/http/http_auth_handler_mock.h
index e7d59972c1e31a7e751e920834898d7b5924ada9..14062397e9804386eaa78d95664c9efd9cf764a3 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_;
};
« no previous file with comments | « net/http/http_auth_handler.cc ('k') | net/http/http_auth_handler_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698