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

Unified Diff: net/proxy/proxy_config.cc

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.cc
diff --git a/net/proxy/proxy_config.cc b/net/proxy/proxy_config.cc
index 70e6549a794def718c815d5581eb917c8bc69250..078293c9b038c1b257e4b3a67e0e5264f51812ba 100644
--- a/net/proxy/proxy_config.cc
+++ b/net/proxy/proxy_config.cc
@@ -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.
@@ -158,13 +158,17 @@ ProxyServer* ProxyConfig::ProxyRules::MapUrlSchemeToProxyNoFallback(
return NULL; // No mapping for this scheme.
}
-ProxyConfig::ProxyConfig() : auto_detect_(false), id_(INVALID_ID) {
+ProxyConfig::ProxyConfig()
+ : auto_detect_(false), pac_mandatory_(false),
+ block_everything_(false), id_(INVALID_ID) {
}
ProxyConfig::ProxyConfig(const ProxyConfig& config)
: auto_detect_(config.auto_detect_),
pac_url_(config.pac_url_),
+ pac_mandatory_(config.pac_mandatory_),
proxy_rules_(config.proxy_rules_),
+ block_everything_(config.block_everything_),
id_(config.id_) {
}
@@ -174,7 +178,9 @@ ProxyConfig::~ProxyConfig() {
ProxyConfig& ProxyConfig::operator=(const ProxyConfig& config) {
auto_detect_ = config.auto_detect_;
pac_url_ = config.pac_url_;
+ pac_mandatory_ = config.pac_mandatory_;
proxy_rules_ = config.proxy_rules_;
+ block_everything_ = config.block_everything_;
id_ = config.id_;
return *this;
}
@@ -184,7 +190,9 @@ bool ProxyConfig::Equals(const ProxyConfig& other) const {
// have the same settings.
return auto_detect_ == other.auto_detect_ &&
pac_url_ == other.pac_url_ &&
- proxy_rules_.Equals(other.proxy_rules());
+ pac_mandatory_ == other.pac_mandatory_ &&
+ proxy_rules_.Equals(other.proxy_rules()) &&
+ block_everything_ == other.block_everything_;
}
bool ProxyConfig::HasAutomaticSettings() const {
@@ -246,4 +254,3 @@ Value* ProxyConfig::ToValue() const {
}
} // namespace net
-

Powered by Google App Engine
This is Rietveld 408576698