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

Unified Diff: net/http/mock_allow_url_security_manager.h

Issue 6264013: Clean up net unit testing code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-virtualize TestDelegate::OnResponseCompleted Created 9 years, 11 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
Index: net/http/mock_allow_url_security_manager.h
diff --git a/net/http/mock_allow_url_security_manager.h b/net/http/mock_allow_url_security_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..32f572e9aab142bcab5c00393fa7032adfa8c796
--- /dev/null
+++ b/net/http/mock_allow_url_security_manager.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_URL_SECURITY_MANAGER_H_
+#define NET_HTTP_MOCK_ALLOW_URL_SECURITY_MANAGER_H_
+#pragma once
+
+#include "net/http/url_security_manager.h"
+
+namespace net {
+
+// An URLSecurityManager which is very permissive and which should only be used
+// in unit testing.
+class MockAllowURLSecurityManager : public URLSecurityManager {
+ public:
+ MockAllowURLSecurityManager();
+ virtual ~MockAllowURLSecurityManager();
+
+ virtual bool CanUseDefaultCredentials(const GURL& auth_origin) const;
+ virtual bool CanDelegate(const GURL& auth_origin) const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockAllowURLSecurityManager);
+};
+
+} // namespace net
+
+#endif // NET_HTTP_MOCK_ALLOW_URL_SECURITY_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698