Chromium Code Reviews| Index: chromeos/network/onc/onc_translator_shill_to_onc.cc |
| diff --git a/chromeos/network/onc/onc_translator_shill_to_onc.cc b/chromeos/network/onc/onc_translator_shill_to_onc.cc |
| index aca2df0c3e5cefb7933b4f834eb0851e0fbe8a6e..40471750f258bd79627cd2f1f96951efc0345fd9 100644 |
| --- a/chromeos/network/onc/onc_translator_shill_to_onc.cc |
| +++ b/chromeos/network/onc/onc_translator_shill_to_onc.cc |
| @@ -17,6 +17,7 @@ |
| #include "chromeos/network/network_util.h" |
| #include "chromeos/network/onc/onc_signature.h" |
| #include "chromeos/network/onc/onc_translation_tables.h" |
| +#include "chromeos/network/onc/onc_utils.h" |
| #include "chromeos/network/shill_property_util.h" |
| #include "components/onc/onc_constants.h" |
| #include "third_party/cros_system_api/dbus/service_constants.h" |
| @@ -562,6 +563,18 @@ void ShillToONCTranslator::TranslateNetworkWithState() { |
| *static_ipconfig); |
| } |
| } |
| + |
| + std::string proxy_config_str; |
| + if (shill_dictionary_->GetStringWithoutPathExpansion( |
| + shill::kProxyConfigProperty, &proxy_config_str) && |
| + !proxy_config_str.empty()) { |
| + scoped_ptr<base::DictionaryValue> proxy_config_value( |
| + ReadDictionaryFromJson(proxy_config_str)); |
|
eroman
2015/07/08 21:26:37
This can return NULL.
stevenjb
2015/07/08 22:13:07
Good catch, added test.
|
| + scoped_ptr<base::DictionaryValue> proxy_settings = |
| + ConvertProxyConfigToOncProxySettings(*proxy_config_value); |
|
eroman
2015/07/08 21:26:37
Note that proxy_config_value could be NULL here.
stevenjb
2015/07/08 22:13:08
ConvertProxyConfigToOncProxySettings can also retu
|
| + onc_object_->SetWithoutPathExpansion(::onc::network_config::kProxySettings, |
| + proxy_settings.release()); |
| + } |
| } |
| void ShillToONCTranslator::TranslateIPConfig() { |