| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 } | 181 } |
| 182 | 182 |
| 183 void set_pac_url(const GURL& url) { | 183 void set_pac_url(const GURL& url) { |
| 184 pac_url_ = url; | 184 pac_url_ = url; |
| 185 } | 185 } |
| 186 | 186 |
| 187 const GURL& pac_url() const { | 187 const GURL& pac_url() const { |
| 188 return pac_url_; | 188 return pac_url_; |
| 189 } | 189 } |
| 190 | 190 |
| 191 void set_my_ip_address(const std::string& ip_address) { |
| 192 my_ip_address_ = ip_address; |
| 193 } |
| 194 |
| 195 const std::string& my_ip_address() const { return my_ip_address_; } |
| 196 |
| 191 void set_pac_mandatory(bool enable_pac_mandatory) { | 197 void set_pac_mandatory(bool enable_pac_mandatory) { |
| 192 pac_mandatory_ = enable_pac_mandatory; | 198 pac_mandatory_ = enable_pac_mandatory; |
| 193 } | 199 } |
| 194 | 200 |
| 195 bool pac_mandatory() const { | 201 bool pac_mandatory() const { |
| 196 return pac_mandatory_; | 202 return pac_mandatory_; |
| 197 } | 203 } |
| 198 | 204 |
| 199 bool has_pac_url() const { | 205 bool has_pac_url() const { |
| 200 return pac_url_.is_valid(); | 206 return pac_url_.is_valid(); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 return config; | 242 return config; |
| 237 } | 243 } |
| 238 | 244 |
| 239 private: | 245 private: |
| 240 // True if the proxy configuration should be auto-detected. | 246 // True if the proxy configuration should be auto-detected. |
| 241 bool auto_detect_; | 247 bool auto_detect_; |
| 242 | 248 |
| 243 // If non-empty, indicates the URL of the proxy auto-config file to use. | 249 // If non-empty, indicates the URL of the proxy auto-config file to use. |
| 244 GURL pac_url_; | 250 GURL pac_url_; |
| 245 | 251 |
| 252 // If non-empty, indicates the ip address to use for myIpAddress calls. |
| 253 std::string my_ip_address_; |
| 254 |
| 246 // If true, blocks all traffic in case fetching the pac script from |pac_url_| | 255 // If true, blocks all traffic in case fetching the pac script from |pac_url_| |
| 247 // fails. Only valid if |pac_url_| is non-empty. | 256 // fails. Only valid if |pac_url_| is non-empty. |
| 248 bool pac_mandatory_; | 257 bool pac_mandatory_; |
| 249 | 258 |
| 250 // Manual proxy settings. | 259 // Manual proxy settings. |
| 251 ProxyRules proxy_rules_; | 260 ProxyRules proxy_rules_; |
| 252 | 261 |
| 253 // Source of proxy settings. | 262 // Source of proxy settings. |
| 254 ProxyConfigSource source_; | 263 ProxyConfigSource source_; |
| 255 | 264 |
| 256 ID id_; | 265 ID id_; |
| 257 }; | 266 }; |
| 258 | 267 |
| 259 } // namespace net | 268 } // namespace net |
| 260 | 269 |
| 261 | 270 |
| 262 | 271 |
| 263 #endif // NET_PROXY_PROXY_CONFIG_H_ | 272 #endif // NET_PROXY_PROXY_CONFIG_H_ |
| OLD | NEW |