| Index: net/proxy/proxy_config.h
|
| diff --git a/net/proxy/proxy_config.h b/net/proxy/proxy_config.h
|
| index 9012a316652ef3f1b2161d398dacc1b45c551a80..dc0fd71d2f966e5811f7f73a113344f39c7a0595 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.
|
| + bool pac_mandatory_;
|
| +
|
| // Manual proxy settings.
|
| ProxyRules proxy_rules_;
|
|
|
|
|