Index: net/proxy/proxy_config.cc |
diff --git a/net/proxy/proxy_config.cc b/net/proxy/proxy_config.cc |
index 86c5284d837429b03e201b76b948c172f6ec1c40..71264fd0b67f8c3f77c43c7dcbf35f2f1a3296d7 100644 |
--- a/net/proxy/proxy_config.cc |
+++ b/net/proxy/proxy_config.cc |
@@ -145,6 +145,8 @@ const ProxyList* ProxyConfig::ProxyRules::MapUrlSchemeToProxyList( |
MapUrlSchemeToProxyListNoFallback(url_scheme); |
if (proxy_server_list && !proxy_server_list->IsEmpty()) |
return proxy_server_list; |
+ if (url_scheme == "ws" || url_scheme == "wss") |
+ return GetProxyListForWebSocketScheme(); |
if (!fallback_proxies.IsEmpty()) |
return &fallback_proxies; |
return NULL; // No mapping for this scheme. Use direct. |
@@ -173,6 +175,17 @@ ProxyList* ProxyConfig::ProxyRules::MapUrlSchemeToProxyListNoFallback( |
return NULL; // No mapping for this scheme. |
} |
+const ProxyList* ProxyConfig::ProxyRules::GetProxyListForWebSocketScheme() |
+ const { |
+ if (!fallback_proxies.IsEmpty()) |
+ return &fallback_proxies; |
+ if (!proxies_for_https.IsEmpty()) |
+ return &proxies_for_https; |
+ if (!proxies_for_http.IsEmpty()) |
+ return &proxies_for_http; |
+ return NULL; |
+} |
+ |
ProxyConfig::ProxyConfig() |
: auto_detect_(false), pac_mandatory_(false), |
source_(PROXY_CONFIG_SOURCE_UNKNOWN), id_(kInvalidConfigID) { |