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 // The implementation of TranslateONCObjectToShill is structured in two parts: | 5 // The implementation of TranslateONCObjectToShill is structured in two parts: |
6 // - The recursion through the existing ONC hierarchy | 6 // - The recursion through the existing ONC hierarchy |
7 // see TranslateONCHierarchy | 7 // see TranslateONCHierarchy |
8 // - The local translation of an object depending on the associated signature | 8 // - The local translation of an object depending on the associated signature |
9 // see LocalTranslator::TranslateFields | 9 // see LocalTranslator::TranslateFields |
10 | 10 |
11 #include "chromeos/network/onc/onc_translator.h" | 11 #include "chromeos/network/onc/onc_translator.h" |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "base/json/json_reader.h" | 15 #include "base/json/json_reader.h" |
16 #include "base/json/json_writer.h" | 16 #include "base/json/json_writer.h" |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/macros.h" |
18 #include "base/strings/string_util.h" | 19 #include "base/strings/string_util.h" |
19 #include "base/values.h" | 20 #include "base/values.h" |
20 #include "chromeos/network/onc/onc_signature.h" | 21 #include "chromeos/network/onc/onc_signature.h" |
21 #include "chromeos/network/onc/onc_translation_tables.h" | 22 #include "chromeos/network/onc/onc_translation_tables.h" |
22 #include "chromeos/network/onc/onc_utils.h" | 23 #include "chromeos/network/onc/onc_utils.h" |
23 #include "chromeos/network/shill_property_util.h" | 24 #include "chromeos/network/shill_property_util.h" |
24 #include "components/onc/onc_constants.h" | 25 #include "components/onc/onc_constants.h" |
25 #include "third_party/cros_system_api/dbus/service_constants.h" | 26 #include "third_party/cros_system_api/dbus/service_constants.h" |
26 | 27 |
27 namespace chromeos { | 28 namespace chromeos { |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 const OncValueSignature* onc_signature, | 419 const OncValueSignature* onc_signature, |
419 const base::DictionaryValue& onc_object) { | 420 const base::DictionaryValue& onc_object) { |
420 CHECK(onc_signature != NULL); | 421 CHECK(onc_signature != NULL); |
421 scoped_ptr<base::DictionaryValue> shill_dictionary(new base::DictionaryValue); | 422 scoped_ptr<base::DictionaryValue> shill_dictionary(new base::DictionaryValue); |
422 TranslateONCHierarchy(*onc_signature, onc_object, shill_dictionary.get()); | 423 TranslateONCHierarchy(*onc_signature, onc_object, shill_dictionary.get()); |
423 return shill_dictionary.Pass(); | 424 return shill_dictionary.Pass(); |
424 } | 425 } |
425 | 426 |
426 } // namespace onc | 427 } // namespace onc |
427 } // namespace chromeos | 428 } // namespace chromeos |
OLD | NEW |