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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 void ShillToONCTranslator::TranslateWiMAXWithState() { | 347 void ShillToONCTranslator::TranslateWiMAXWithState() { |
348 CopyPropertiesAccordingToSignature(); | 348 CopyPropertiesAccordingToSignature(); |
349 TranslateAndAddNestedObject(::onc::wimax::kEAP); | 349 TranslateAndAddNestedObject(::onc::wimax::kEAP); |
350 } | 350 } |
351 | 351 |
352 void ShillToONCTranslator::TranslateCellularWithState() { | 352 void ShillToONCTranslator::TranslateCellularWithState() { |
353 CopyPropertiesAccordingToSignature(); | 353 CopyPropertiesAccordingToSignature(); |
354 TranslateWithTableAndSet(shill::kActivationStateProperty, | 354 TranslateWithTableAndSet(shill::kActivationStateProperty, |
355 kActivationStateTable, | 355 kActivationStateTable, |
356 ::onc::cellular::kActivationState); | 356 ::onc::cellular::kActivationState); |
| 357 TranslateWithTableAndSet(shill::kNetworkTechnologyProperty, |
| 358 kNetworkTechnologyTable, |
| 359 ::onc::cellular::kNetworkTechnology); |
357 const base::DictionaryValue* dictionary = NULL; | 360 const base::DictionaryValue* dictionary = NULL; |
358 if (shill_dictionary_->GetDictionaryWithoutPathExpansion( | 361 if (shill_dictionary_->GetDictionaryWithoutPathExpansion( |
359 shill::kServingOperatorProperty, &dictionary)) { | 362 shill::kServingOperatorProperty, &dictionary)) { |
360 TranslateAndAddNestedObject(::onc::cellular::kServingOperator, *dictionary); | 363 TranslateAndAddNestedObject(::onc::cellular::kServingOperator, *dictionary); |
361 } | 364 } |
362 if (shill_dictionary_->GetDictionaryWithoutPathExpansion( | 365 if (shill_dictionary_->GetDictionaryWithoutPathExpansion( |
363 shill::kCellularApnProperty, &dictionary)) { | 366 shill::kCellularApnProperty, &dictionary)) { |
364 TranslateAndAddNestedObject(::onc::cellular::kAPN, *dictionary); | 367 TranslateAndAddNestedObject(::onc::cellular::kAPN, *dictionary); |
365 } | 368 } |
366 if (shill_dictionary_->GetDictionaryWithoutPathExpansion( | 369 if (shill_dictionary_->GetDictionaryWithoutPathExpansion( |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 ::onc::ONCSource onc_source, | 725 ::onc::ONCSource onc_source, |
723 const OncValueSignature* onc_signature) { | 726 const OncValueSignature* onc_signature) { |
724 CHECK(onc_signature != NULL); | 727 CHECK(onc_signature != NULL); |
725 | 728 |
726 ShillToONCTranslator translator(shill_dictionary, onc_source, *onc_signature); | 729 ShillToONCTranslator translator(shill_dictionary, onc_source, *onc_signature); |
727 return translator.CreateTranslatedONCObject(); | 730 return translator.CreateTranslatedONCObject(); |
728 } | 731 } |
729 | 732 |
730 } // namespace onc | 733 } // namespace onc |
731 } // namespace chromeos | 734 } // namespace chromeos |
OLD | NEW |