| Index: chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
|
| diff --git a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
|
| index 11e45fd2e665abf996652412096408c67e55ec4e..564376ca756ba40f147c43a4fd8252cd34819b57 100644
|
| --- a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
|
| +++ b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
|
| @@ -377,28 +377,32 @@ DictionaryValue* CreateProxyRulesDict(
|
| case net::ProxyConfig::ProxyRules::TYPE_NO_RULES:
|
| return NULL;
|
| case net::ProxyConfig::ProxyRules::TYPE_SINGLE_PROXY:
|
| - if (rules.single_proxy.is_valid()) {
|
| - extension_proxy_rules->Set(keys::field_name[keys::SCHEME_ALL],
|
| - CreateProxyServerDict(rules.single_proxy));
|
| + if (!rules.single_proxies.IsEmpty()) {
|
| + extension_proxy_rules->Set(
|
| + keys::field_name[keys::SCHEME_ALL],
|
| + CreateProxyServerDict(rules.single_proxies.Get()));
|
| }
|
| break;
|
| case net::ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME:
|
| - if (rules.proxy_for_http.is_valid()) {
|
| - extension_proxy_rules->Set(keys::field_name[keys::SCHEME_HTTP],
|
| - CreateProxyServerDict(rules.proxy_for_http));
|
| + if (!rules.proxies_for_http.IsEmpty()) {
|
| + extension_proxy_rules->Set(
|
| + keys::field_name[keys::SCHEME_HTTP],
|
| + CreateProxyServerDict(rules.proxies_for_http.Get()));
|
| }
|
| - if (rules.proxy_for_https.is_valid()) {
|
| + if (!rules.proxies_for_https.IsEmpty()) {
|
| extension_proxy_rules->Set(
|
| keys::field_name[keys::SCHEME_HTTPS],
|
| - CreateProxyServerDict(rules.proxy_for_https));
|
| + CreateProxyServerDict(rules.proxies_for_https.Get()));
|
| }
|
| - if (rules.proxy_for_ftp.is_valid()) {
|
| - extension_proxy_rules->Set(keys::field_name[keys::SCHEME_FTP],
|
| - CreateProxyServerDict(rules.proxy_for_ftp));
|
| + if (!rules.proxies_for_ftp.IsEmpty()) {
|
| + extension_proxy_rules->Set(
|
| + keys::field_name[keys::SCHEME_FTP],
|
| + CreateProxyServerDict(rules.proxies_for_ftp.Get()));
|
| }
|
| - if (rules.fallback_proxy.is_valid()) {
|
| - extension_proxy_rules->Set(keys::field_name[keys::SCHEME_FALLBACK],
|
| - CreateProxyServerDict(rules.fallback_proxy));
|
| + if (!rules.fallback_proxies.IsEmpty()) {
|
| + extension_proxy_rules->Set(
|
| + keys::field_name[keys::SCHEME_FALLBACK],
|
| + CreateProxyServerDict(rules.fallback_proxies.Get()));
|
| }
|
| break;
|
| }
|
|
|