diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-13 06:16:36 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-13 06:16:36 +0000 |
commit | a809f9001fd8f66087c6879fb56600c038cfc5fa (patch) | |
tree | a624823759159399d153b8a61eb99bb87ebfa28d /net/proxy/proxy_config.h | |
parent | d79a982f4bae3718457555dea55d9a9144b043fc (diff) | |
download | chromium_src-a809f9001fd8f66087c6879fb56600c038cfc5fa.zip chromium_src-a809f9001fd8f66087c6879fb56600c038cfc5fa.tar.gz chromium_src-a809f9001fd8f66087c6879fb56600c038cfc5fa.tar.bz2 |
Emit an event to NetLog whenever the proxy settings change.
Also removes the operator<< on ProxyConfig.
BUG=52004
Review URL: http://codereview.chromium.org/3144008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55999 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_config.h')
-rw-r--r-- | net/proxy/proxy_config.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/net/proxy/proxy_config.h b/net/proxy/proxy_config.h index a4d535da..5254216 100644 --- a/net/proxy/proxy_config.h +++ b/net/proxy/proxy_config.h @@ -6,7 +6,6 @@ #define NET_PROXY_PROXY_CONFIG_H_ #pragma once -#include <ostream> #include <string> #include <vector> @@ -14,6 +13,8 @@ #include "net/proxy/proxy_bypass_rules.h" #include "net/proxy/proxy_server.h" +class Value; + namespace net { class ProxyInfo; @@ -115,7 +116,7 @@ class ProxyConfig { // Used to numerically identify this configuration. ID id() const { return id_; } void set_id(int id) { id_ = id; } - bool is_valid() { return id_ != INVALID_ID; } + bool is_valid() const { return id_ != INVALID_ID; } // Returns true if the given config is equivalent to this config. bool Equals(const ProxyConfig& other) const; @@ -124,6 +125,13 @@ class ProxyConfig { // use a PAC resolver. bool MayRequirePACResolver() const; + // Creates a textual dump of the configuration. + std::string ToString() const; + + // Creates a Value dump of this configuration. The caller is responsible for + // deleting the returned value. + Value* ToValue() const; + ProxyRules& proxy_rules() { return proxy_rules_; } @@ -185,13 +193,6 @@ class ProxyConfig { } // namespace net -// Dumps a human-readable string representation of the configuration to |out|; -// used when logging the configuration changes. -std::ostream& operator<<(std::ostream& out, const net::ProxyConfig& config); -// Dumps a human-readable string representation of the |rules| to |out|; -// used for logging and for better unittest failure output. -std::ostream& operator<<(std::ostream& out, - const net::ProxyConfig::ProxyRules& rules); #endif // NET_PROXY_PROXY_CONFIG_H_ |