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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(shill::kSecurityClassProperty, | 316 TranslateWithTableAndSet(shill::kSecurityClassProperty, |
317 kWiFiSecurityTable, | 317 kWiFiSecurityTable, |
318 ::onc::wifi::kSecurity); | 318 ::onc::wifi::kSecurity); |
319 bool unknown_encoding = true; | 319 bool unknown_encoding = true; |
320 std::string ssid = shill_property_util::GetSSIDFromProperties( | 320 std::string ssid = shill_property_util::GetSSIDFromProperties( |
321 *shill_dictionary_, &unknown_encoding); | 321 *shill_dictionary_, false /* verbose_logging */, &unknown_encoding); |
322 if (!unknown_encoding && !ssid.empty()) | 322 if (!unknown_encoding && !ssid.empty()) |
323 onc_object_->SetStringWithoutPathExpansion(::onc::wifi::kSSID, ssid); | 323 onc_object_->SetStringWithoutPathExpansion(::onc::wifi::kSSID, ssid); |
324 | 324 |
325 bool link_monitor_disable; | 325 bool link_monitor_disable; |
326 if (shill_dictionary_->GetBooleanWithoutPathExpansion( | 326 if (shill_dictionary_->GetBooleanWithoutPathExpansion( |
327 shill::kLinkMonitorDisableProperty, &link_monitor_disable)) { | 327 shill::kLinkMonitorDisableProperty, &link_monitor_disable)) { |
328 onc_object_->SetBooleanWithoutPathExpansion( | 328 onc_object_->SetBooleanWithoutPathExpansion( |
329 ::onc::wifi::kAllowGatewayARPPolling, !link_monitor_disable); | 329 ::onc::wifi::kAllowGatewayARPPolling, !link_monitor_disable); |
330 } | 330 } |
331 | 331 |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 ::onc::ONCSource onc_source, | 700 ::onc::ONCSource onc_source, |
701 const OncValueSignature* onc_signature) { | 701 const OncValueSignature* onc_signature) { |
702 CHECK(onc_signature != NULL); | 702 CHECK(onc_signature != NULL); |
703 | 703 |
704 ShillToONCTranslator translator(shill_dictionary, onc_source, *onc_signature); | 704 ShillToONCTranslator translator(shill_dictionary, onc_source, *onc_signature); |
705 return translator.CreateTranslatedONCObject(); | 705 return translator.CreateTranslatedONCObject(); |
706 } | 706 } |
707 | 707 |
708 } // namespace onc | 708 } // namespace onc |
709 } // namespace chromeos | 709 } // namespace chromeos |
OLD | NEW |