diff options
author | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-04 16:44:29 +0000 |
---|---|---|
committer | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-04 16:44:29 +0000 |
commit | aafb7821da75fc427ae025ba2c4a864340abf3ac (patch) | |
tree | d7f409301478fdaa07d72becb13a4f0ccc472d0d /net/proxy/proxy_config.cc | |
parent | d7f205d44f8d5c3c0289c5b889467695f6da51fc (diff) | |
download | chromium_src-aafb7821da75fc427ae025ba2c4a864340abf3ac.zip chromium_src-aafb7821da75fc427ae025ba2c4a864340abf3ac.tar.gz chromium_src-aafb7821da75fc427ae025ba2c4a864340abf3ac.tar.bz2 |
Get rid of the static next_id_ counter, to make construction of ProxyConfig on different threads safe.
BUG=11323
Review URL: http://codereview.chromium.org/102023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15209 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_config.cc')
-rw-r--r-- | net/proxy/proxy_config.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/proxy/proxy_config.cc b/net/proxy/proxy_config.cc index 20c0e3a..a860c99 100644 --- a/net/proxy/proxy_config.cc +++ b/net/proxy/proxy_config.cc @@ -9,13 +9,10 @@ namespace net { -// static -ProxyConfig::ID ProxyConfig::last_id_ = ProxyConfig::INVALID_ID; - ProxyConfig::ProxyConfig() : auto_detect(false), proxy_bypass_local_names(false), - id_(++last_id_) { + id_(INVALID_ID) { } bool ProxyConfig::Equals(const ProxyConfig& other) const { @@ -140,6 +137,7 @@ std::ostream& operator<<(std::ostream& out, const net::ProxyConfig& config) { out << " }\n"; } - out << "}"; + out << " id: " << config.id() << "\n" + << "}"; return out; } |