| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_HTTP_AUTH_FILTER_H_ | 5 #ifndef NET_HTTP_HTTP_AUTH_FILTER_H_ |
| 6 #define NET_HTTP_HTTP_AUTH_FILTER_H_ | 6 #define NET_HTTP_HTTP_AUTH_FILTER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 // Adds an individual URL |filter| to the list, of the specified |target|. | 41 // Adds an individual URL |filter| to the list, of the specified |target|. |
| 42 bool AddFilter(const std::string& filter, HttpAuth::Target target); | 42 bool AddFilter(const std::string& filter, HttpAuth::Target target); |
| 43 | 43 |
| 44 // Adds a rule that bypasses all "local" hostnames. | 44 // Adds a rule that bypasses all "local" hostnames. |
| 45 void AddRuleToBypassLocal(); | 45 void AddRuleToBypassLocal(); |
| 46 | 46 |
| 47 const ProxyBypassRules& rules() const { return rules_; } | 47 const ProxyBypassRules& rules() const { return rules_; } |
| 48 | 48 |
| 49 // HttpAuthFilter methods: | 49 // HttpAuthFilter methods: |
| 50 virtual bool IsValid(const GURL& url, HttpAuth::Target target) const; | 50 virtual bool IsValid(const GURL& url, HttpAuth::Target target) const OVERRIDE; |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 // Installs the whitelist. | 53 // Installs the whitelist. |
| 54 // |server_whitelist| is parsed by ProxyBypassRules. | 54 // |server_whitelist| is parsed by ProxyBypassRules. |
| 55 void SetWhitelist(const std::string& server_whitelist); | 55 void SetWhitelist(const std::string& server_whitelist); |
| 56 | 56 |
| 57 // We are using ProxyBypassRules because they have the functionality that we | 57 // We are using ProxyBypassRules because they have the functionality that we |
| 58 // want, but we are not using it for proxy bypass. | 58 // want, but we are not using it for proxy bypass. |
| 59 ProxyBypassRules rules_; | 59 ProxyBypassRules rules_; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(HttpAuthFilterWhitelist); | 61 DISALLOW_COPY_AND_ASSIGN(HttpAuthFilterWhitelist); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // namespace net | 64 } // namespace net |
| 65 | 65 |
| 66 #endif // NET_HTTP_HTTP_AUTH_FILTER_H_ | 66 #endif // NET_HTTP_HTTP_AUTH_FILTER_H_ |
| OLD | NEW |