| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_HTTP_URL_SECURITY_MANAGER_H_ | 5 #ifndef NET_HTTP_URL_SECURITY_MANAGER_H_ |
| 6 #define NET_HTTP_URL_SECURITY_MANAGER_H_ | 6 #define NET_HTTP_URL_SECURITY_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 // URLSecurityManager methods. | 41 // URLSecurityManager methods. |
| 42 virtual bool CanUseDefaultCredentials(const GURL& auth_origin); | 42 virtual bool CanUseDefaultCredentials(const GURL& auth_origin); |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 scoped_ptr<HttpAuthFilter> whitelist_; | 45 scoped_ptr<HttpAuthFilter> whitelist_; |
| 46 | 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(URLSecurityManagerWhitelist); | 47 DISALLOW_COPY_AND_ASSIGN(URLSecurityManagerWhitelist); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 #if defined(UNIT_TEST) |
| 51 // An URLSecurityManager which always allows default credentials. |
| 52 class URLSecurityManagerAllow : public URLSecurityManager { |
| 53 public: |
| 54 URLSecurityManagerAllow() {} |
| 55 virtual ~URLSecurityManagerAllow() {} |
| 56 |
| 57 virtual bool CanUseDefaultCredentials(const GURL& auth_origin) { |
| 58 return true; |
| 59 } |
| 60 |
| 61 private: |
| 62 DISALLOW_COPY_AND_ASSIGN(URLSecurityManagerAllow); |
| 63 }; |
| 64 #endif // defined(UNIT_TEST) |
| 65 |
| 50 } // namespace net | 66 } // namespace net |
| 51 | 67 |
| 52 #endif // NET_HTTP_URL_SECURITY_MANAGER_H_ | 68 #endif // NET_HTTP_URL_SECURITY_MANAGER_H_ |
| OLD | NEW |