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

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

Issue 249193003: Add Shill to ONC translation of IPConfig. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 8 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_translator_shill_to_onc.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.cc
diff --git a/chromeos/network/onc/onc_translation_tables.cc b/chromeos/network/onc/onc_translation_tables.cc
index 603c3b3ae230f5301e38ea8528b2bf7fcd93925f..c520cf9be59693cd439aca067914940a9c503d58 100644
--- a/chromeos/network/onc/onc_translation_tables.cc
+++ b/chromeos/network/onc/onc_translation_tables.cc
@@ -18,8 +18,6 @@ namespace onc {
//
// Proxy settings are converted to Shill by function
// ConvertOncProxySettingsToProxyConfig(...).
-//
-// Translation of IPConfig objects is not supported, yet.
namespace {
@@ -175,6 +173,13 @@ const FieldTranslationEntry network_fields[] = {
// { ::onc::network_config::kConnectionState, shill::kStateProperty },
{NULL}};
+const FieldTranslationEntry ipconfig_fields[] = {
+ { ::onc::ipconfig::kIPAddress, shill::kAddressProperty},
+ { ::onc::ipconfig::kGateway, shill::kGatewayProperty},
+ { ::onc::ipconfig::kRoutingPrefix, shill::kPrefixlenProperty},
+ { ::onc::ipconfig::kNameServers, shill::kNameServersProperty},
+ {NULL}};
+
struct OncValueTranslationEntry {
const OncValueSignature* onc_signature;
const FieldTranslationEntry* field_translation_table;
@@ -196,6 +201,7 @@ const OncValueTranslationEntry onc_value_translation_table[] = {
{ &kCellularWithStateSignature, cellular_fields },
{ &kNetworkWithStateSignature, network_fields },
{ &kNetworkConfigurationSignature, network_fields },
+ { &kIPConfigSignature, ipconfig_fields },
{ NULL }
};
« no previous file with comments | « chromeos/network/onc/onc_signature.cc ('k') | chromeos/network/onc/onc_translator_shill_to_onc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698