Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Unified Diff: chromeos/network/onc/onc_translator_shill_to_onc.cc

Issue 11414101: This adds ManagedNetworkConfigurationHandler first pass (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: upload after merge Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromeos/network/onc/onc_translator_shill_to_onc.cc
diff --git a/chromeos/network/onc/onc_translator_shill_to_onc.cc b/chromeos/network/onc/onc_translator_shill_to_onc.cc
index 4e190108c7cc27c505b573f56635aed43a490ea0..e7a7d49a46bfaf1ab376c2141c03715063880b54 100644
--- a/chromeos/network/onc/onc_translator_shill_to_onc.cc
+++ b/chromeos/network/onc/onc_translator_shill_to_onc.cc
@@ -191,7 +191,7 @@ void ShillToONCTranslator::TranslateWiFi() {
void ShillToONCTranslator::TranslateAndAddNestedObject(
const std::string& onc_field_name) {
const OncFieldSignature* field_signature =
- GetFieldSignature(*onc_signature_, onc_field_name);
+ GetOncFieldSignature(*onc_signature_, onc_field_name);
ShillToONCTranslator nested_translator(*shill_dictionary_,
*field_signature->value_signature);
scoped_ptr<base::DictionaryValue> nested_object =
@@ -281,6 +281,22 @@ void ShillToONCTranslator::TranslateWithTableAndSet(
} // namespace
+std::vector<std::string> TranslateShillPropertyNamesToONC(
+ const std::vector<std::string>& shill_names,
+ const OncValueSignature* signature) {
+ std::vector<std::string> result;
+ for (std::vector<std::string>::const_iterator iter = shill_names.begin();
+ iter != shill_names.end(); ++iter) {
+ const OncFieldSignature* field_signature =
+ GetShillFieldSignature(*signature, *iter);
+ DCHECK(field_signature != NULL);
+ if (field_signature == NULL || field_signature->onc_field_name == NULL)
+ continue;
+ result.push_back(field_signature->onc_field_name);
+ }
+ return result;
+}
+
scoped_ptr<base::DictionaryValue> TranslateShillServiceToONCPart(
const base::DictionaryValue& shill_dictionary,
const OncValueSignature* onc_signature) {
« no previous file with comments | « chromeos/network/onc/onc_translator_onc_to_shill.cc ('k') | chromeos/network/onc/onc_translator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698