Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1469)

Unified Diff: net/proxy/proxy_config.h

Issue 6871019: Enable (optional) blocking of webrequests in case a PAC script cannot be fetched or is invalid. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_;
};

Powered by Google App Engine
This is Rietveld 408576698