Index: net/http/http_auth_handler_mock.cc |
=================================================================== |
--- net/http/http_auth_handler_mock.cc (revision 95261) |
+++ net/http/http_auth_handler_mock.cc (working copy) |
@@ -142,10 +142,9 @@ |
HttpAuthHandlerMock::Factory::~Factory() { |
} |
-void HttpAuthHandlerMock::Factory::set_mock_handler( |
+void HttpAuthHandlerMock::Factory::AddMockHandler( |
HttpAuthHandler* handler, HttpAuth::Target target) { |
- EXPECT_TRUE(handlers_[target].get() == NULL); |
- handlers_[target].reset(handler); |
+ handlers_[target].push_back(handler); |
} |
int HttpAuthHandlerMock::Factory::CreateAuthHandler( |
@@ -156,9 +155,10 @@ |
int nonce_count, |
const BoundNetLog& net_log, |
scoped_ptr<HttpAuthHandler>* handler) { |
- if (!handlers_[target].get()) |
+ if (handlers_[target].empty()) |
return ERR_UNEXPECTED; |
- scoped_ptr<HttpAuthHandler> tmp_handler(handlers_[target].release()); |
+ scoped_ptr<HttpAuthHandler> tmp_handler(handlers_[target][0]); |
cbentzel
2011/08/03 21:22:10
I'd add an alias to handlers_[target].get() here t
Ryan Hamilton
2011/08/03 22:03:37
Done.
|
+ handlers_[target].get().erase(handlers_[target].get().begin()); |
if (do_init_from_challenge_ && |
!tmp_handler->InitFromChallenge(challenge, target, origin, net_log)) |
return ERR_INVALID_RESPONSE; |