summaryrefslogtreecommitdiffstats
path: root/net/proxy
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-01 00:46:33 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-01 00:46:33 +0000
commitd643172a8573e7e75f325bec2125de8071bfd0fc (patch)
tree16d43bab4652624b87e1e7acfbecb63310a6e736 /net/proxy
parentf5e7e8e162433ab6e8223c8b3da4feb64abddc33 (diff)
downloadchromium_src-d643172a8573e7e75f325bec2125de8071bfd0fc.zip
chromium_src-d643172a8573e7e75f325bec2125de8071bfd0fc.tar.gz
chromium_src-d643172a8573e7e75f325bec2125de8071bfd0fc.tar.bz2
Reduce number of unnamed-type-template-args violations (mostly when passing values to DCHECK(), ASSERT_EQ(), etc.), generally by naming previously-anonymous enums. We've decided not to eliminate the warning entirely because doing so is only possible with tons of ugly static_cast<>()s in Mac code.
BUG=92247 TEST=Compiles Review URL: http://codereview.chromium.org/7605019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99086 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy')
-rw-r--r--net/proxy/proxy_config.cc2
-rw-r--r--net/proxy/proxy_config.h4
-rw-r--r--net/proxy/proxy_info.cc2
-rw-r--r--net/proxy/proxy_service.cc6
4 files changed, 7 insertions, 7 deletions
diff --git a/net/proxy/proxy_config.cc b/net/proxy/proxy_config.cc
index 42589a9..d160fa4 100644
--- a/net/proxy/proxy_config.cc
+++ b/net/proxy/proxy_config.cc
@@ -159,7 +159,7 @@ ProxyServer* ProxyConfig::ProxyRules::MapUrlSchemeToProxyNoFallback(
}
ProxyConfig::ProxyConfig()
- : auto_detect_(false), pac_mandatory_(false), id_(INVALID_ID) {
+ : auto_detect_(false), pac_mandatory_(false), id_(kInvalidConfigID) {
}
ProxyConfig::ProxyConfig(const ProxyConfig& config)
diff --git a/net/proxy/proxy_config.h b/net/proxy/proxy_config.h
index 0c353ce..f666e93 100644
--- a/net/proxy/proxy_config.h
+++ b/net/proxy/proxy_config.h
@@ -110,7 +110,7 @@ class NET_EXPORT ProxyConfig {
typedef int ID;
// Indicates an invalid proxy config.
- enum { INVALID_ID = 0 };
+ static const ID kInvalidConfigID = 0;
ProxyConfig();
ProxyConfig(const ProxyConfig& config);
@@ -120,7 +120,7 @@ class NET_EXPORT ProxyConfig {
// Used to numerically identify this configuration.
ID id() const { return id_; }
void set_id(int id) { id_ = id; }
- bool is_valid() const { return id_ != INVALID_ID; }
+ bool is_valid() const { return id_ != kInvalidConfigID; }
// Returns true if the given config is equivalent to this config.
bool Equals(const ProxyConfig& other) const;
diff --git a/net/proxy/proxy_info.cc b/net/proxy/proxy_info.cc
index 85d6cae..b7d40a0 100644
--- a/net/proxy/proxy_info.cc
+++ b/net/proxy/proxy_info.cc
@@ -8,7 +8,7 @@
namespace net {
-ProxyInfo::ProxyInfo() : config_id_(ProxyConfig::INVALID_ID) {
+ProxyInfo::ProxyInfo() : config_id_(ProxyConfig::kInvalidConfigID) {
}
ProxyInfo::~ProxyInfo() {
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index 643b9be..c8f3620 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -308,7 +308,7 @@ class ProxyService::PacRequest
results_(results),
url_(url),
resolve_job_(NULL),
- config_id_(ProxyConfig::INVALID_ID),
+ config_id_(ProxyConfig::kInvalidConfigID),
net_log_(net_log) {
DCHECK(user_callback);
}
@@ -375,7 +375,7 @@ class ProxyService::PacRequest
// Reset the state associated with in-progress-resolve.
resolve_job_ = NULL;
- config_id_ = ProxyConfig::INVALID_ID;
+ config_id_ = ProxyConfig::kInvalidConfigID;
return service_->DidFinishResolvingProxy(results_, result_code, net_log_);
}
@@ -599,7 +599,7 @@ int ProxyService::TryToCompleteSynchronously(const GURL& url,
if (current_state_ != STATE_READY)
return ERR_IO_PENDING; // Still initializing.
- DCHECK_NE(config_.id(), ProxyConfig::INVALID_ID);
+ DCHECK_NE(config_.id(), ProxyConfig::kInvalidConfigID);
// If it was impossible to fetch or parse the PAC script, we cannot complete
// the request here and bail out.