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

Unified Diff: net/http/http_auth_handler_mock.h

Issue 7477055: Change HttpAuthHandlerMock to accept and return more than one (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months 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_controller_unittest.cc ('k') | net/http/http_auth_handler_mock.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
};
« no previous file with comments | « net/http/http_auth_controller_unittest.cc ('k') | net/http/http_auth_handler_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698