| OLD | NEW |
| 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 Loading... |
| 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 ::onc::ONCSource onc_source, | 680 ::onc::ONCSource onc_source, |
| 680 const OncValueSignature* onc_signature) { | 681 const OncValueSignature* onc_signature) { |
| 681 CHECK(onc_signature != NULL); | 682 CHECK(onc_signature != NULL); |
| 682 | 683 |
| 683 ShillToONCTranslator translator(shill_dictionary, onc_source, *onc_signature); | 684 ShillToONCTranslator translator(shill_dictionary, onc_source, *onc_signature); |
| 684 return translator.CreateTranslatedONCObject(); | 685 return translator.CreateTranslatedONCObject(); |
| 685 } | 686 } |
| 686 | 687 |
| 687 } // namespace onc | 688 } // namespace onc |
| 688 } // namespace chromeos | 689 } // namespace chromeos |
| OLD | NEW |