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

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

Issue 2853563002: ONC: Translate EAP from Shill to ONC (Closed)
Patch Set: Use params Created 3 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
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 7796c2afcbd8b6844e21718cede425c699a1dcd9..e709c75015843cb05fbd1eab3f44717a6594de23 100644
--- a/chromeos/network/onc/onc_translator_shill_to_onc.cc
+++ b/chromeos/network/onc/onc_translator_shill_to_onc.cc
@@ -90,6 +90,7 @@ class ShillToONCTranslator {
void TranslateSavedOrStaticIPConfig();
void TranslateSavedIPConfig();
void TranslateStaticIPConfig();
+ void TranslateEap();
// Creates an ONC object from |dictionary| according to the signature
// associated to |onc_field_name| and adds it to |onc_object_| at
@@ -180,6 +181,8 @@ ShillToONCTranslator::CreateTranslatedONCObject() {
TranslateSavedIPConfig();
} else if (onc_signature_ == &kStaticIPConfigSignature) {
TranslateStaticIPConfig();
+ } else if (onc_signature_ == &kEAPSignature) {
+ TranslateEap();
} else {
CopyPropertiesAccordingToSignature();
}
@@ -630,6 +633,16 @@ void ShillToONCTranslator::TranslateStaticIPConfig() {
TranslateSavedOrStaticIPConfig();
}
+void ShillToONCTranslator::TranslateEap() {
+ CopyPropertiesAccordingToSignature();
+
+ // Translate EAP Outer and Inner values.
+ TranslateWithTableAndSet(shill::kEapMethodProperty, kEAPOuterTable,
+ ::onc::eap::kOuter);
+ TranslateWithTableAndSet(shill::kEapPhase2AuthProperty, kEAP_TTLS_InnerTable,
+ ::onc::eap::kInner);
+}
+
void ShillToONCTranslator::TranslateAndAddNestedObject(
const std::string& onc_field_name) {
TranslateAndAddNestedObject(onc_field_name, *shill_dictionary_);

Powered by Google App Engine
This is Rietveld 408576698