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

Unified Diff: chromeos/network/onc/onc_translator_onc_to_shill.cc

Issue 694533007: Add 'setProperties' to InternetOptionsHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 1 month 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: chromeos/network/onc/onc_translator_onc_to_shill.cc
diff --git a/chromeos/network/onc/onc_translator_onc_to_shill.cc b/chromeos/network/onc/onc_translator_onc_to_shill.cc
index d78548fd5af4207aaaf57b455e16aae28ee149e3..8cf29016f41d03314e7db3ffcbe755e01e3333b8 100644
--- a/chromeos/network/onc/onc_translator_onc_to_shill.cc
+++ b/chromeos/network/onc/onc_translator_onc_to_shill.cc
@@ -218,8 +218,8 @@ void LocalTranslator::TranslateIPsec() {
void LocalTranslator::TranslateVPN() {
CopyFieldFromONCToShill(::onc::vpn::kHost, shill::kProviderHostProperty);
std::string type;
- onc_object_->GetStringWithoutPathExpansion(::onc::vpn::kType, &type);
- TranslateWithTableAndSet(type, kVPNTypeTable, shill::kProviderTypeProperty);
+ if (onc_object_->GetStringWithoutPathExpansion(::onc::vpn::kType, &type))
+ TranslateWithTableAndSet(type, kVPNTypeTable, shill::kProviderTypeProperty);
CopyFieldsAccordingToSignature();
}
@@ -232,7 +232,8 @@ void LocalTranslator::TranslateWiFi() {
std::string ssid;
onc_object_->GetStringWithoutPathExpansion(::onc::wifi::kSSID, &ssid);
- shill_property_util::SetSSID(ssid, shill_dictionary_);
+ if (!ssid.empty())
+ shill_property_util::SetSSID(ssid, shill_dictionary_);
// We currently only support managed and no adhoc networks.
shill_dictionary_->SetStringWithoutPathExpansion(shill::kModeProperty,

Powered by Google App Engine
This is Rietveld 408576698