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

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

Issue 788633003: chromeos networking: move from security to securityclass property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@local-master
Patch Set: rebase, resolve conflicts, update new test data (shill_wifi_dhcp.json) 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 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 TranslateWithTableAndSet(type, kVPNTypeTable, shill::kProviderTypeProperty); 194 TranslateWithTableAndSet(type, kVPNTypeTable, shill::kProviderTypeProperty);
195 195
196 CopyFieldsAccordingToSignature(); 196 CopyFieldsAccordingToSignature();
197 } 197 }
198 198
199 void LocalTranslator::TranslateWiFi() { 199 void LocalTranslator::TranslateWiFi() {
200 std::string security; 200 std::string security;
201 if (onc_object_->GetStringWithoutPathExpansion( 201 if (onc_object_->GetStringWithoutPathExpansion(
202 ::onc::wifi::kSecurity, &security)) { 202 ::onc::wifi::kSecurity, &security)) {
203 TranslateWithTableAndSet(security, kWiFiSecurityTable, 203 TranslateWithTableAndSet(security, kWiFiSecurityTable,
204 shill::kSecurityProperty); 204 shill::kSecurityClassProperty);
205 } 205 }
206 206
207 std::string ssid; 207 std::string ssid;
208 onc_object_->GetStringWithoutPathExpansion(::onc::wifi::kSSID, &ssid); 208 onc_object_->GetStringWithoutPathExpansion(::onc::wifi::kSSID, &ssid);
209 if (!ssid.empty()) 209 if (!ssid.empty())
210 shill_property_util::SetSSID(ssid, shill_dictionary_); 210 shill_property_util::SetSSID(ssid, shill_dictionary_);
211 211
212 // We currently only support managed and no adhoc networks. 212 // We currently only support managed and no adhoc networks.
213 shill_dictionary_->SetStringWithoutPathExpansion(shill::kModeProperty, 213 shill_dictionary_->SetStringWithoutPathExpansion(shill::kModeProperty,
214 shill::kModeManaged); 214 shill::kModeManaged);
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 const OncValueSignature* onc_signature, 389 const OncValueSignature* onc_signature,
390 const base::DictionaryValue& onc_object) { 390 const base::DictionaryValue& onc_object) {
391 CHECK(onc_signature != NULL); 391 CHECK(onc_signature != NULL);
392 scoped_ptr<base::DictionaryValue> shill_dictionary(new base::DictionaryValue); 392 scoped_ptr<base::DictionaryValue> shill_dictionary(new base::DictionaryValue);
393 TranslateONCHierarchy(*onc_signature, onc_object, shill_dictionary.get()); 393 TranslateONCHierarchy(*onc_signature, onc_object, shill_dictionary.get());
394 return shill_dictionary.Pass(); 394 return shill_dictionary.Pass();
395 } 395 }
396 396
397 } // namespace onc 397 } // namespace onc
398 } // namespace chromeos 398 } // 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