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 <string> | 5 #include <string> |
6 #include <utility> | 6 #include <utility> |
7 | 7 |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 } else { | 317 } else { |
318 TranslateAndAddNestedObject(onc_provider_type, *provider); | 318 TranslateAndAddNestedObject(onc_provider_type, *provider); |
319 provider_type_dictionary = onc_provider_type; | 319 provider_type_dictionary = onc_provider_type; |
320 } | 320 } |
321 | 321 |
322 bool save_credentials; | 322 bool save_credentials; |
323 if (onc_provider_type != ::onc::vpn::kThirdPartyVpn && | 323 if (onc_provider_type != ::onc::vpn::kThirdPartyVpn && |
324 shill_dictionary_->GetBooleanWithoutPathExpansion( | 324 shill_dictionary_->GetBooleanWithoutPathExpansion( |
325 shill::kSaveCredentialsProperty, &save_credentials)) { | 325 shill::kSaveCredentialsProperty, &save_credentials)) { |
326 SetNestedOncValue(provider_type_dictionary, ::onc::vpn::kSaveCredentials, | 326 SetNestedOncValue(provider_type_dictionary, ::onc::vpn::kSaveCredentials, |
327 base::FundamentalValue(save_credentials)); | 327 base::Value(save_credentials)); |
328 } | 328 } |
329 } | 329 } |
330 | 330 |
331 void ShillToONCTranslator::TranslateWiFiWithState() { | 331 void ShillToONCTranslator::TranslateWiFiWithState() { |
332 std::string shill_security; | 332 std::string shill_security; |
333 std::string shill_key_mgmt; | 333 std::string shill_key_mgmt; |
334 if (shill_dictionary_->GetStringWithoutPathExpansion( | 334 if (shill_dictionary_->GetStringWithoutPathExpansion( |
335 shill::kSecurityClassProperty, &shill_security) && | 335 shill::kSecurityClassProperty, &shill_security) && |
336 shill_security == shill::kSecurityWep && | 336 shill_security == shill::kSecurityWep && |
337 shill_dictionary_->GetStringWithoutPathExpansion( | 337 shill_dictionary_->GetStringWithoutPathExpansion( |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 const NetworkState* network_state) { | 778 const NetworkState* network_state) { |
779 CHECK(onc_signature != NULL); | 779 CHECK(onc_signature != NULL); |
780 | 780 |
781 ShillToONCTranslator translator(shill_dictionary, onc_source, *onc_signature, | 781 ShillToONCTranslator translator(shill_dictionary, onc_source, *onc_signature, |
782 network_state); | 782 network_state); |
783 return translator.CreateTranslatedONCObject(); | 783 return translator.CreateTranslatedONCObject(); |
784 } | 784 } |
785 | 785 |
786 } // namespace onc | 786 } // namespace onc |
787 } // namespace chromeos | 787 } // namespace chromeos |
OLD | NEW |