Chromium Code Reviews| Index: net/proxy/proxy_config.h |
| diff --git a/net/proxy/proxy_config.h b/net/proxy/proxy_config.h |
| index 9012a316652ef3f1b2161d398dacc1b45c551a80..4a2ee5c49888798f4a881a2f532dff664e1df8c7 100644 |
| --- a/net/proxy/proxy_config.h |
| +++ b/net/proxy/proxy_config.h |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @@ -148,6 +148,14 @@ class ProxyConfig { |
| return pac_url_; |
| } |
| + void set_pac_mandatory(bool enable_pac_mandatory) { |
| + pac_mandatory_ = enable_pac_mandatory; |
| + } |
| + |
| + bool pac_mandatory() const { |
| + return pac_mandatory_; |
| + } |
| + |
| bool has_pac_url() const { |
| return pac_url_.is_valid(); |
| } |
| @@ -175,6 +183,8 @@ class ProxyConfig { |
| static ProxyConfig CreateFromCustomPacURL(const GURL& pac_url) { |
| ProxyConfig config; |
| config.set_pac_url(pac_url); |
| + // By default fall back to direct connection in case PAC script fails. |
| + config.set_pac_mandatory(false); |
| return config; |
| } |
| @@ -185,6 +195,10 @@ class ProxyConfig { |
| // If non-empty, indicates the URL of the proxy auto-config file to use. |
| GURL pac_url_; |
| + // If true, blocks all traffic in case fetching the pac script from |pac_url_| |
| + // fails. Only valid if pac_url_ is non-empty. |
|
eroman
2011/05/03 09:45:24
minor nit: enclose enclose "pac_url_" as in |pac_u
battre
2011/05/03 09:55:14
Done.
|
| + bool pac_mandatory_; |
| + |
| // Manual proxy settings. |
| ProxyRules proxy_rules_; |