Index: net/http/http_auth_handler_mock.h |
=================================================================== |
--- net/http/http_auth_handler_mock.h (revision 95261) |
+++ net/http/http_auth_handler_mock.h (working copy) |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -8,6 +8,7 @@ |
#include <string> |
+#include "base/memory/scoped_vector.h" |
#include "base/string16.h" |
#include "base/task.h" |
#include "googleurl/src/gurl.h" |
@@ -29,14 +30,14 @@ |
RESOLVE_TESTED, |
}; |
- // The Factory class simply returns the same handler each time |
- // CreateAuthHandler is called. |
+ // The Factory class returns handlers in the order they were added via |
+ // AddMockHandler. |
class Factory : public HttpAuthHandlerFactory { |
public: |
Factory(); |
virtual ~Factory(); |
- void set_mock_handler(HttpAuthHandler* handler, HttpAuth::Target target); |
+ void AddMockHandler(HttpAuthHandler* handler, HttpAuth::Target target); |
void set_do_init_from_challenge(bool do_init_from_challenge) { |
do_init_from_challenge_ = do_init_from_challenge; |
@@ -52,7 +53,7 @@ |
scoped_ptr<HttpAuthHandler>* handler); |
private: |
- scoped_ptr<HttpAuthHandler> handlers_[HttpAuth::AUTH_NUM_TARGETS]; |
+ ScopedVector<HttpAuthHandler> handlers_[HttpAuth::AUTH_NUM_TARGETS]; |
bool do_init_from_challenge_; |
}; |