Chromium Code Reviews| Index: net/http/mock_allow_http_auth_preferences.h |
| diff --git a/net/http/mock_allow_http_auth_preferences.h b/net/http/mock_allow_http_auth_preferences.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b932c42554286497b8f169ef4093406351939f46 |
| --- /dev/null |
| +++ b/net/http/mock_allow_http_auth_preferences.h |
| @@ -0,0 +1,29 @@ |
| +// 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. |
| + |
| +#ifndef NET_HTTP_MOCK_ALLOW_HTTP_AUTH_PREFERENCES_H_ |
| +#define NET_HTTP_MOCK_ALLOW_HTTP_AUTH_PREFERENCES_H_ |
| + |
| +#include "base/macros.h" |
| +#include "net/http/http_auth_preferences.h" |
| + |
| +namespace net { |
| + |
| +// An HttpAuthPreferences class containing a URLSecurityManager which is very |
|
asanka
2015/12/01 05:30:03
Nit: Actually the URLSecurityManager is not releva
aberent
2015/12/01 14:33:25
Done.
|
| +// permissive and which should only be used in unit testing. |
| +class MockAllowHttpAuthPreferences : public HttpAuthPreferences { |
| + public: |
| + MockAllowHttpAuthPreferences(); |
| + ~MockAllowHttpAuthPreferences() override; |
| + |
| + bool CanUseDefaultCredentials(const GURL& auth_origin) const override; |
| + bool CanDelegate(const GURL& auth_origin) const override; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(MockAllowHttpAuthPreferences); |
| +}; |
| + |
| +} // namespace net |
| + |
| +#endif // NET_HTTP_MOCK_ALLOW_HTTP_AUTH_PREFERENCES_H_ |