diff options
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_ |