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..9ff7170fac7d35d3757324c0080e67932164ce70 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(); |
| } |
| @@ -160,6 +168,14 @@ class ProxyConfig { |
| return auto_detect_; |
| } |
| + void set_block_everything(bool enable_block_everything) { |
|
eroman
2011/04/26 21:47:17
I would rather not have this bool here, since it i
battre
2011/04/27 17:02:58
I have introduced the int. I don't know whether th
|
| + block_everything_ = enable_block_everything; |
| + } |
| + |
| + bool block_everything() const { |
| + return block_everything_; |
| + } |
| + |
| // Helpers to construct some common proxy configurations. |
| static ProxyConfig CreateDirect() { |
| @@ -185,9 +201,16 @@ 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_; |
| + // If true, no traffic can be sent. |
| + bool block_everything_; |
| + |
| int id_; |
| }; |