OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/http/http_auth_handler_mock.h" | 5 #include "net/http/http_auth_handler_mock.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
11 #include "net/http/http_request_info.h" | 11 #include "net/http/http_request_info.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 namespace net { | 14 namespace net { |
15 | 15 |
16 HttpAuthHandlerMock::HttpAuthHandlerMock() | 16 HttpAuthHandlerMock::HttpAuthHandlerMock() |
17 : resolve_(RESOLVE_INIT), | 17 : resolve_(RESOLVE_INIT), |
18 weak_factory_(this), | 18 weak_factory_(this), |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 std::vector<HttpAuthHandler*>& handlers = handlers_[target].get(); | 177 std::vector<HttpAuthHandler*>& handlers = handlers_[target].get(); |
178 handlers.erase(handlers.begin()); | 178 handlers.erase(handlers.begin()); |
179 if (do_init_from_challenge_ && | 179 if (do_init_from_challenge_ && |
180 !tmp_handler->InitFromChallenge(challenge, target, origin, net_log)) | 180 !tmp_handler->InitFromChallenge(challenge, target, origin, net_log)) |
181 return ERR_INVALID_RESPONSE; | 181 return ERR_INVALID_RESPONSE; |
182 handler->swap(tmp_handler); | 182 handler->swap(tmp_handler); |
183 return OK; | 183 return OK; |
184 } | 184 } |
185 | 185 |
186 } // namespace net | 186 } // namespace net |
OLD | NEW |