| 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
|
|
|