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

Unified Diff: net/http/http_auth_handler_mock.h

Issue 3028021: Alternate-Protocol was failing when going through Digest authenticating proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Make unit test happy after merge. Created 10 years, 5 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 | « no previous file | 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 f9a676c4f3bd4ba521382e7602f0fb7e1d632765..a6b0d488de3a77d9f03fb93da03d60400cb9f838 100644
--- a/net/http/http_auth_handler_mock.h
+++ b/net/http/http_auth_handler_mock.h
@@ -10,6 +10,7 @@
#include "base/string16.h"
#include "base/task.h"
+#include "googleurl/src/gurl.h"
#include "net/http/http_auth_handler.h"
#include "net/http/http_auth_handler_factory.h"
@@ -46,15 +47,23 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
connection_based_ = connection_based;
}
+ const GURL& request_url() const {
+ return request_url_;
+ }
+
// The Factory class simply returns the same handler each time
// CreateAuthHandler is called.
class Factory : public HttpAuthHandlerFactory {
public:
- Factory() {}
- virtual ~Factory() {}
+ Factory();
+ virtual ~Factory();
void set_mock_handler(HttpAuthHandler* handler, HttpAuth::Target target);
+ void set_do_init_from_challenge(bool do_init_from_challenge) {
+ do_init_from_challenge_ = do_init_from_challenge;
+ }
+
virtual int CreateAuthHandler(HttpAuth::ChallengeTokenizer* challenge,
HttpAuth::Target target,
const GURL& origin,
@@ -65,6 +74,7 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
private:
scoped_ptr<HttpAuthHandler> handlers_[HttpAuth::AUTH_NUM_TARGETS];
+ bool do_init_from_challenge_;
};
protected:
@@ -89,6 +99,7 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
std::string* auth_token_;
bool first_round_;
bool connection_based_;
+ GURL request_url_;
};
} // namespace net
« no previous file with comments | « no previous file | net/http/http_auth_handler_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698