| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 } | 376 } |
| 377 | 377 |
| 378 void ShillToONCTranslator::TranslateCellularDevice() { | 378 void ShillToONCTranslator::TranslateCellularDevice() { |
| 379 CopyPropertiesAccordingToSignature(); | 379 CopyPropertiesAccordingToSignature(); |
| 380 const base::DictionaryValue* shill_sim_lock_status = NULL; | 380 const base::DictionaryValue* shill_sim_lock_status = NULL; |
| 381 if (shill_dictionary_->GetDictionaryWithoutPathExpansion( | 381 if (shill_dictionary_->GetDictionaryWithoutPathExpansion( |
| 382 shill::kSIMLockStatusProperty, &shill_sim_lock_status)) { | 382 shill::kSIMLockStatusProperty, &shill_sim_lock_status)) { |
| 383 TranslateAndAddNestedObject(::onc::cellular::kSIMLockStatus, | 383 TranslateAndAddNestedObject(::onc::cellular::kSIMLockStatus, |
| 384 *shill_sim_lock_status); | 384 *shill_sim_lock_status); |
| 385 } | 385 } |
| 386 const base::DictionaryValue* shill_home_provider = NULL; |
| 387 if (shill_dictionary_->GetDictionaryWithoutPathExpansion( |
| 388 shill::kHomeProviderProperty, &shill_home_provider)) { |
| 389 TranslateAndAddNestedObject(::onc::cellular::kHomeProvider, |
| 390 *shill_home_provider); |
| 391 } |
| 386 const base::ListValue* shill_apns = NULL; | 392 const base::ListValue* shill_apns = NULL; |
| 387 if (shill_dictionary_->GetListWithoutPathExpansion( | 393 if (shill_dictionary_->GetListWithoutPathExpansion( |
| 388 shill::kCellularApnListProperty, &shill_apns)) { | 394 shill::kCellularApnListProperty, &shill_apns)) { |
| 389 TranslateAndAddListOfObjects(::onc::cellular::kAPNList, *shill_apns); | 395 TranslateAndAddListOfObjects(::onc::cellular::kAPNList, *shill_apns); |
| 390 } | 396 } |
| 391 const base::ListValue* shill_found_networks = NULL; | 397 const base::ListValue* shill_found_networks = NULL; |
| 392 if (shill_dictionary_->GetListWithoutPathExpansion( | 398 if (shill_dictionary_->GetListWithoutPathExpansion( |
| 393 shill::kFoundNetworksProperty, &shill_found_networks)) { | 399 shill::kFoundNetworksProperty, &shill_found_networks)) { |
| 394 TranslateAndAddListOfObjects(::onc::cellular::kFoundNetworks, | 400 TranslateAndAddListOfObjects(::onc::cellular::kFoundNetworks, |
| 395 *shill_found_networks); | 401 *shill_found_networks); |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 ::onc::ONCSource onc_source, | 706 ::onc::ONCSource onc_source, |
| 701 const OncValueSignature* onc_signature) { | 707 const OncValueSignature* onc_signature) { |
| 702 CHECK(onc_signature != NULL); | 708 CHECK(onc_signature != NULL); |
| 703 | 709 |
| 704 ShillToONCTranslator translator(shill_dictionary, onc_source, *onc_signature); | 710 ShillToONCTranslator translator(shill_dictionary, onc_source, *onc_signature); |
| 705 return translator.CreateTranslatedONCObject(); | 711 return translator.CreateTranslatedONCObject(); |
| 706 } | 712 } |
| 707 | 713 |
| 708 } // namespace onc | 714 } // namespace onc |
| 709 } // namespace chromeos | 715 } // namespace chromeos |
| OLD | NEW |