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

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

Issue 708563005: Use setProperties for IP Config. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_430113_internet_options_1
Patch Set: Fix win/mac test expectations Created 5 years, 11 months 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_handler.cc ('k') | components/wifi/fake_wifi_service.cc » ('j') | 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 194be93939d9b7341604142937c8652ef0660154..fbfe16ecaa5d0cc328114ca36da8e992b4919066 100644
--- a/chromeos/network/onc/onc_translator_onc_to_shill.cc
+++ b/chromeos/network/onc/onc_translator_onc_to_shill.cc
@@ -198,9 +198,11 @@ void LocalTranslator::TranslateVPN() {
void LocalTranslator::TranslateWiFi() {
std::string security;
- onc_object_->GetStringWithoutPathExpansion(::onc::wifi::kSecurity, &security);
- TranslateWithTableAndSet(security, kWiFiSecurityTable,
- shill::kSecurityProperty);
+ if (onc_object_->GetStringWithoutPathExpansion(
+ ::onc::wifi::kSecurity, &security)) {
+ TranslateWithTableAndSet(security, kWiFiSecurityTable,
+ shill::kSecurityProperty);
+ }
std::string ssid;
onc_object_->GetStringWithoutPathExpansion(::onc::wifi::kSSID, &ssid);
@@ -336,7 +338,7 @@ void LocalTranslator::TranslateWithTableAndSet(
// occurs, we should check here. Otherwise the failure will only show up much
// later in Shill.
LOG(ERROR) << "Value '" << onc_value
- << "' cannot be translated to Shill property "
+ << "' cannot be translated to Shill property: "
<< shill_property_name;
}
« no previous file with comments | « chromeos/network/network_handler.cc ('k') | components/wifi/fake_wifi_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698