| 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 |
| 11 class GURL; | 11 class GURL; |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 | 14 |
| 15 class HttpAuthFilter; | 15 class HttpAuthFilter; |
| 16 | 16 |
| 17 // The URL security manager controls the policies (allow, deny, prompt user) | 17 // The URL security manager controls the policies (allow, deny, prompt user) |
| 18 // regarding URL actions (e.g., sending the default credentials to a server). | 18 // regarding URL actions (e.g., sending the default credentials to a server). |
| 19 class URLSecurityManager { | 19 class URLSecurityManager { |
| 20 public: | 20 public: |
| 21 URLSecurityManager() {} | 21 URLSecurityManager() {} |
| 22 virtual ~URLSecurityManager() {} | 22 virtual ~URLSecurityManager() {} |
| 23 | 23 |
| 24 // Creates a platform-dependent instance of URLSecurityManager. | 24 // Creates a platform-dependent instance of URLSecurityManager. |
| 25 // The URLSecurityManager takes ownership of the HttpAuthFilter. | 25 // The URLSecurityManager takes ownership of the HttpAuthFilter. |
| 26 static URLSecurityManager* Create(HttpAuthFilter* whitelist); | 26 static URLSecurityManager* Create(HttpAuthFilter* whitelist); |
| 27 | 27 |
| 28 // Returns true if we can send the default credentials to the server at | 28 // Returns true if we can send the default credentials to the server at |
| 29 // |auth_origin| for HTTP NTLM or Negotiate authentication. | 29 // |auth_origin| for HTTP NTLM or Negotiate authentication. |
| 30 virtual bool CanUseDefaultCredentials(const GURL& auth_origin) const = 0; | 30 virtual bool CanUseDefaultCredentials(const GURL& auth_origin) const = 0; |
| 31 | 31 |
| 32 private: | 32 private: |
| (...skipping 10 matching lines...) Expand all Loading... |
| 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 } // namespace net | 50 } // namespace net |
| 51 | 51 |
| 52 #endif // NET_HTTP_URL_SECURITY_MANAGER_H_ | 52 #endif // NET_HTTP_URL_SECURITY_MANAGER_H_ |
| OLD | NEW |