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

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: Rebase + feedback 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
« no previous file with comments | « chromeos/network/network_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 69d0d41dbce2207f961c262f5b05482cce5c9838..5300a9d424b5e003ceb66a2c5c9b62c3922b06d1 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,
« no previous file with comments | « chromeos/network/network_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698