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

Unified Diff: chromeos/network/onc/onc_translation_tables.h

Issue 12390017: Separating ONC<->Shill translation from the ONC signature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed browser tests. Created 7 years, 10 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
« no previous file with comments | « chromeos/network/onc/onc_signature.cc ('k') | chromeos/network/onc/onc_translation_tables.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/onc/onc_translation_tables.h
diff --git a/chromeos/network/onc/onc_translation_tables.h b/chromeos/network/onc/onc_translation_tables.h
index 580173bb50d3a983c770e6d0cc72ec8d27528a81..ef0256c49c4cf2707b3f52e66b6ea4165b5e4502 100644
--- a/chromeos/network/onc/onc_translation_tables.h
+++ b/chromeos/network/onc/onc_translation_tables.h
@@ -7,9 +7,21 @@
#include <string>
+#include "chromeos/network/onc/onc_signature.h"
+
namespace chromeos {
namespace onc {
+struct FieldTranslationEntry {
+ const char* onc_field_name;
+ const char* shill_property_name;
+};
+
+struct OncValueTranslationEntry {
+ const OncValueSignature* onc_signature;
+ const FieldTranslationEntry* field_translation_table;
+};
+
struct StringTranslationEntry {
const char* onc_value;
const char* shill_value;
@@ -24,6 +36,13 @@ extern const StringTranslationEntry kEAPOuterTable[];
extern const StringTranslationEntry kEAP_PEAP_InnerTable[];
extern const StringTranslationEntry kEAP_TTLS_InnerTable[];
+const FieldTranslationEntry* GetFieldTranslationTable(
+ const OncValueSignature& onc_signature);
+
+bool GetShillPropertyName(const std::string& onc_field_name,
+ const FieldTranslationEntry table[],
+ std::string* shill_property_name);
+
// Translate individual strings to Shill using the above tables.
bool TranslateStringToShill(const StringTranslationEntry table[],
const std::string& onc_value,
« no previous file with comments | « chromeos/network/onc/onc_signature.cc ('k') | chromeos/network/onc/onc_translation_tables.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698