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

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

Issue 267433005: Provide IPConfigs in networkingPrivate.GetProperties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 8 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/onc/onc_translation_tables.cc ('k') | chromeos/network/shill_property_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7716fbf2954d2a49d065b51ce40f0b5ff11d063a..f9d73183d2459ea880eb2d588ac258f28eb4e860 100644
--- a/chromeos/network/onc/onc_translator_shill_to_onc.cc
+++ b/chromeos/network/onc/onc_translator_shill_to_onc.cc
@@ -319,15 +319,18 @@ void ShillToONCTranslator::TranslateIPConfig() {
std::string shill_ip_method;
shill_dictionary_->GetStringWithoutPathExpansion(shill::kMethodProperty,
&shill_ip_method);
- if (shill_ip_method != shill::kTypeIPv4 &&
- shill_ip_method != shill::kTypeIPv6) {
- LOG(ERROR) << "Unhandled IPConfig Method value " << shill_ip_method;
- return;
- }
-
- std::string type = ::onc::ipconfig::kIPv4;
- if (shill_ip_method == shill::kTypeIPv6)
+ std::string type;
+ if (shill_ip_method == shill::kTypeIPv4)
pneubeck (no reviews) 2014/05/02 09:57:43 Ok, I think we have a mismatch of the properties'
stevenjb 2014/05/02 17:22:34 Hm, I see, OK. We have to support multiple "IPv6"
+ type == ::onc::ipconfig::kIPv4;
+ else if (shill_ip_method == shill::kTypeIPv6)
type = ::onc::ipconfig::kIPv6;
+ else if (shill_ip_method == shill::kTypeDHCP)
+ type = ::onc::ipconfig::kDHCPv4;
+ else if (shill_ip_method == shill::kTypeDHCP6)
+ type = ::onc::ipconfig::kDHCPv6;
+ else
+ return; // Ignore unhandled IPConfig types, e.g. bootp, zeroconf, ppp
+
onc_object_->SetStringWithoutPathExpansion(::onc::ipconfig::kType, type);
}
« no previous file with comments | « chromeos/network/onc/onc_translation_tables.cc ('k') | chromeos/network/shill_property_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698