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

Unified Diff: net/http/http_auth_handler_mock.cc

Issue 1520253002: Remove ScopedVector from http_auth_handler_mock (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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_mock.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler_mock.cc
diff --git a/net/http/http_auth_handler_mock.cc b/net/http/http_auth_handler_mock.cc
index f800c192ac4060e12695b8cbb5cd22e3a17daee2..04a09e4d6b1333ac0ea2ea79d60b684a75a34ea7 100644
--- a/net/http/http_auth_handler_mock.cc
+++ b/net/http/http_auth_handler_mock.cc
@@ -161,7 +161,7 @@ HttpAuthHandlerMock::Factory::~Factory() {
void HttpAuthHandlerMock::Factory::AddMockHandler(
HttpAuthHandler* handler, HttpAuth::Target target) {
- handlers_[target].push_back(handler);
+ handlers_[target].push_back(make_scoped_ptr(handler));
}
int HttpAuthHandlerMock::Factory::CreateAuthHandler(
@@ -174,8 +174,8 @@ int HttpAuthHandlerMock::Factory::CreateAuthHandler(
scoped_ptr<HttpAuthHandler>* handler) {
if (handlers_[target].empty())
return ERR_UNEXPECTED;
- scoped_ptr<HttpAuthHandler> tmp_handler(handlers_[target][0]);
- std::vector<HttpAuthHandler*>& handlers = handlers_[target].get();
+ scoped_ptr<HttpAuthHandler> tmp_handler = std::move(handlers_[target][0]);
+ std::vector<scoped_ptr<HttpAuthHandler>>& handlers = handlers_[target];
handlers.erase(handlers.begin());
if (do_init_from_challenge_ &&
!tmp_handler->InitFromChallenge(challenge, target, origin, net_log))
« no previous file with comments | « net/http/http_auth_handler_mock.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698