| Index: components/proxy_config/proxy_config_dictionary.cc
|
| diff --git a/components/proxy_config/proxy_config_dictionary.cc b/components/proxy_config/proxy_config_dictionary.cc
|
| index e493bda910cd104d798f36497222ebd06c518ba9..326dd137766812eace6a3a7a4a254a08a2d56f91 100644
|
| --- a/components/proxy_config/proxy_config_dictionary.cc
|
| +++ b/components/proxy_config/proxy_config_dictionary.cc
|
| @@ -7,6 +7,7 @@
|
| #include "base/basictypes.h"
|
| #include "base/logging.h"
|
| #include "base/values.h"
|
| +#include "net/proxy/proxy_config.h"
|
|
|
| namespace {
|
|
|
| @@ -141,3 +142,21 @@ base::DictionaryValue* ProxyConfigDictionary::CreateDictionary(
|
| dict->SetString(kProxyBypassList, bypass_list);
|
| return dict;
|
| }
|
| +
|
| +// static
|
| +void ProxyConfigDictionary::EncodeAndAppendProxyServer(
|
| + const std::string& url_scheme,
|
| + const net::ProxyServer& server,
|
| + std::string* spec) {
|
| + if (!server.is_valid())
|
| + return;
|
| +
|
| + if (!spec->empty())
|
| + *spec += ';';
|
| +
|
| + if (!url_scheme.empty()) {
|
| + *spec += url_scheme;
|
| + *spec += "=";
|
| + }
|
| + *spec += server.ToURI();
|
| +}
|
|
|