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

Side by Side Diff: chromeos/network/onc/onc_translator_onc_to_shill.cc

Issue 1412283006: Translate 802.1x WEP ("Enterprise WEP") (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Included missing test files Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // The implementation of TranslateONCObjectToShill is structured in two parts: 5 // The implementation of TranslateONCObjectToShill is structured in two parts:
6 // - The recursion through the existing ONC hierarchy 6 // - The recursion through the existing ONC hierarchy
7 // see TranslateONCHierarchy 7 // see TranslateONCHierarchy
8 // - The local translation of an object depending on the associated signature 8 // - The local translation of an object depending on the associated signature
9 // see LocalTranslator::TranslateFields 9 // see LocalTranslator::TranslateFields
10 10
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 CopyFieldsAccordingToSignature(); 214 CopyFieldsAccordingToSignature();
215 } 215 }
216 216
217 void LocalTranslator::TranslateWiFi() { 217 void LocalTranslator::TranslateWiFi() {
218 std::string security; 218 std::string security;
219 if (onc_object_->GetStringWithoutPathExpansion(::onc::wifi::kSecurity, 219 if (onc_object_->GetStringWithoutPathExpansion(::onc::wifi::kSecurity,
220 &security)) { 220 &security)) {
221 TranslateWithTableAndSet(security, kWiFiSecurityTable, 221 TranslateWithTableAndSet(security, kWiFiSecurityTable,
222 shill::kSecurityClassProperty); 222 shill::kSecurityClassProperty);
223 if (security == ::onc::wifi::kWEP_8021X) {
224 shill_dictionary_->SetStringWithoutPathExpansion(
225 shill::kEapKeyMgmtProperty, ::onc::wifi::kKeyMgmtIEEE8021X);
stevenjb 2015/11/04 00:14:57 Sorry, missed this the first time through. We shou
Paul Stewart 2015/11/04 18:26:23 Done.
226 }
223 } 227 }
224 228
225 // We currently only support managed and no adhoc networks. 229 // We currently only support managed and no adhoc networks.
226 shill_dictionary_->SetStringWithoutPathExpansion(shill::kModeProperty, 230 shill_dictionary_->SetStringWithoutPathExpansion(shill::kModeProperty,
227 shill::kModeManaged); 231 shill::kModeManaged);
228 232
229 bool allow_gateway_arp_polling; 233 bool allow_gateway_arp_polling;
230 if (onc_object_->GetBooleanWithoutPathExpansion( 234 if (onc_object_->GetBooleanWithoutPathExpansion(
231 ::onc::wifi::kAllowGatewayARPPolling, &allow_gateway_arp_polling)) { 235 ::onc::wifi::kAllowGatewayARPPolling, &allow_gateway_arp_polling)) {
232 shill_dictionary_->SetBooleanWithoutPathExpansion( 236 shill_dictionary_->SetBooleanWithoutPathExpansion(
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 const OncValueSignature* onc_signature, 418 const OncValueSignature* onc_signature,
415 const base::DictionaryValue& onc_object) { 419 const base::DictionaryValue& onc_object) {
416 CHECK(onc_signature != NULL); 420 CHECK(onc_signature != NULL);
417 scoped_ptr<base::DictionaryValue> shill_dictionary(new base::DictionaryValue); 421 scoped_ptr<base::DictionaryValue> shill_dictionary(new base::DictionaryValue);
418 TranslateONCHierarchy(*onc_signature, onc_object, shill_dictionary.get()); 422 TranslateONCHierarchy(*onc_signature, onc_object, shill_dictionary.get());
419 return shill_dictionary.Pass(); 423 return shill_dictionary.Pass();
420 } 424 }
421 425
422 } // namespace onc 426 } // namespace onc
423 } // namespace chromeos 427 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_translation_tables.cc ('k') | chromeos/network/onc/onc_translator_shill_to_onc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698