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_PROXY_PROXY_CONFIG_H_ | 5 #ifndef NET_PROXY_PROXY_CONFIG_H_ |
6 #define NET_PROXY_PROXY_CONFIG_H_ | 6 #define NET_PROXY_PROXY_CONFIG_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
12 #include "net/base/net_api.h" | 12 #include "net/base/net_api.h" |
13 #include "net/proxy/proxy_bypass_rules.h" | 13 #include "net/proxy/proxy_bypass_rules.h" |
14 #include "net/proxy/proxy_server.h" | 14 #include "net/proxy/proxy_server.h" |
15 | 15 |
| 16 namespace base { |
16 class Value; | 17 class Value; |
| 18 } |
17 | 19 |
18 namespace net { | 20 namespace net { |
19 | 21 |
20 class ProxyInfo; | 22 class ProxyInfo; |
21 | 23 |
22 // ProxyConfig describes a user's proxy settings. | 24 // ProxyConfig describes a user's proxy settings. |
23 // | 25 // |
24 // There are two categories of proxy settings: | 26 // There are two categories of proxy settings: |
25 // (1) Automatic (indicates the methods to obtain a PAC script) | 27 // (1) Automatic (indicates the methods to obtain a PAC script) |
26 // (2) Manual (simple set of proxy servers per scheme, and bypass patterns) | 28 // (2) Manual (simple set of proxy servers per scheme, and bypass patterns) |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 bool Equals(const ProxyConfig& other) const; | 126 bool Equals(const ProxyConfig& other) const; |
125 | 127 |
126 // Returns true if this config contains any "automatic" settings. See the | 128 // Returns true if this config contains any "automatic" settings. See the |
127 // class description for what that means. | 129 // class description for what that means. |
128 bool HasAutomaticSettings() const; | 130 bool HasAutomaticSettings() const; |
129 | 131 |
130 void ClearAutomaticSettings(); | 132 void ClearAutomaticSettings(); |
131 | 133 |
132 // Creates a Value dump of this configuration. The caller is responsible for | 134 // Creates a Value dump of this configuration. The caller is responsible for |
133 // deleting the returned value. | 135 // deleting the returned value. |
134 Value* ToValue() const; | 136 base::Value* ToValue() const; |
135 | 137 |
136 ProxyRules& proxy_rules() { | 138 ProxyRules& proxy_rules() { |
137 return proxy_rules_; | 139 return proxy_rules_; |
138 } | 140 } |
139 | 141 |
140 const ProxyRules& proxy_rules() const { | 142 const ProxyRules& proxy_rules() const { |
141 return proxy_rules_; | 143 return proxy_rules_; |
142 } | 144 } |
143 | 145 |
144 void set_pac_url(const GURL& url) { | 146 void set_pac_url(const GURL& url) { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 ProxyRules proxy_rules_; | 206 ProxyRules proxy_rules_; |
205 | 207 |
206 int id_; | 208 int id_; |
207 }; | 209 }; |
208 | 210 |
209 } // namespace net | 211 } // namespace net |
210 | 212 |
211 | 213 |
212 | 214 |
213 #endif // NET_PROXY_PROXY_CONFIG_H_ | 215 #endif // NET_PROXY_PROXY_CONFIG_H_ |
OLD | NEW |