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

Side by Side Diff: chromeos/network/onc/onc_translator_shill_to_onc.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 #include "chromeos/network/onc/onc_translator.h" 5 #include "chromeos/network/onc/onc_translator.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 bool save_credentials; 306 bool save_credentials;
307 if (shill_dictionary_->GetBooleanWithoutPathExpansion( 307 if (shill_dictionary_->GetBooleanWithoutPathExpansion(
308 shill::kSaveCredentialsProperty, &save_credentials)) { 308 shill::kSaveCredentialsProperty, &save_credentials)) {
309 SetNestedOncValue(provider_type_dictionary, 309 SetNestedOncValue(provider_type_dictionary,
310 ::onc::vpn::kSaveCredentials, 310 ::onc::vpn::kSaveCredentials,
311 base::FundamentalValue(save_credentials)); 311 base::FundamentalValue(save_credentials));
312 } 312 }
313 } 313 }
314 314
315 void ShillToONCTranslator::TranslateWiFiWithState() { 315 void ShillToONCTranslator::TranslateWiFiWithState() {
316 TranslateWithTableAndSet( 316 TranslateWithTableAndSet(shill::kSecurityClassProperty,
317 shill::kSecurityProperty, kWiFiSecurityTable, ::onc::wifi::kSecurity); 317 kWiFiSecurityTable,
318 ::onc::wifi::kSecurity);
318 std::string ssid = shill_property_util::GetSSIDFromProperties( 319 std::string ssid = shill_property_util::GetSSIDFromProperties(
319 *shill_dictionary_, NULL /* ignore unknown encoding */); 320 *shill_dictionary_, NULL /* ignore unknown encoding */);
320 if (!ssid.empty()) 321 if (!ssid.empty())
321 onc_object_->SetStringWithoutPathExpansion(::onc::wifi::kSSID, ssid); 322 onc_object_->SetStringWithoutPathExpansion(::onc::wifi::kSSID, ssid);
322 323
323 bool link_monitor_disable; 324 bool link_monitor_disable;
324 if (shill_dictionary_->GetBooleanWithoutPathExpansion( 325 if (shill_dictionary_->GetBooleanWithoutPathExpansion(
325 shill::kLinkMonitorDisableProperty, &link_monitor_disable)) { 326 shill::kLinkMonitorDisableProperty, &link_monitor_disable)) {
326 onc_object_->SetBooleanWithoutPathExpansion( 327 onc_object_->SetBooleanWithoutPathExpansion(
327 ::onc::wifi::kAllowGatewayARPPolling, !link_monitor_disable); 328 ::onc::wifi::kAllowGatewayARPPolling, !link_monitor_disable);
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 ::onc::ONCSource onc_source, 699 ::onc::ONCSource onc_source,
699 const OncValueSignature* onc_signature) { 700 const OncValueSignature* onc_signature) {
700 CHECK(onc_signature != NULL); 701 CHECK(onc_signature != NULL);
701 702
702 ShillToONCTranslator translator(shill_dictionary, onc_source, *onc_signature); 703 ShillToONCTranslator translator(shill_dictionary, onc_source, *onc_signature);
703 return translator.CreateTranslatedONCObject(); 704 return translator.CreateTranslatedONCObject();
704 } 705 }
705 706
706 } // namespace onc 707 } // namespace onc
707 } // namespace chromeos 708 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_translator_onc_to_shill.cc ('k') | chromeos/network/onc/onc_translator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698