Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Unified Diff: components/proxy_config/proxy_config_dictionary.h

Issue 1228543002: Translate ONC ProxySettings <-> Shill ProxyConfig (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add SchemeToString Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/proxy_config/proxy_config_dictionary.h
diff --git a/components/proxy_config/proxy_config_dictionary.h b/components/proxy_config/proxy_config_dictionary.h
index 54ccc74593ce0aaaec798752a170fd4d496e0e3d..236a96beb4980860046892498d8f8df34b71be4f 100644
--- a/components/proxy_config/proxy_config_dictionary.h
+++ b/components/proxy_config/proxy_config_dictionary.h
@@ -16,6 +16,10 @@ namespace base {
class DictionaryValue;
}
+namespace net {
+class ProxyServer;
+}
+
// Factory and wrapper for proxy config dictionaries that are stored
// in the user preferences. The dictionary has the following structure:
// {
@@ -43,11 +47,18 @@ class PROXY_CONFIG_EXPORT ProxyConfigDictionary {
static base::DictionaryValue* CreateDirect();
static base::DictionaryValue* CreateAutoDetect();
static base::DictionaryValue* CreatePacScript(const std::string& pac_url,
- bool pac_mandatory);
+ bool pac_mandatory);
static base::DictionaryValue* CreateFixedServers(
const std::string& proxy_server,
const std::string& bypass_list);
static base::DictionaryValue* CreateSystem();
+
+ // Encodes the proxy server as "<url-scheme>=<proxy-scheme>://<proxy>".
+ // Used to generate the |proxy_server| arg for CreateFixedServers().
+ static void EncodeAndAppendProxyServer(const std::string& url_scheme,
+ const net::ProxyServer& server,
+ std::string* spec);
+
private:
static base::DictionaryValue* CreateDictionary(
ProxyPrefs::ProxyMode mode,

Powered by Google App Engine
This is Rietveld 408576698