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

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

Issue 2818593003: [CrOS Tether] Add tether network properties (battery percentage, carrier, and signal strength) to t… (Closed)
Patch Set: Ran git cl format. Created 3 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_unittest.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 27feecbbb029ffffe62edc3572ca9e7349dec266..51fa269c38e44d0a3b6d49466e062d8f7bf37354 100644
--- a/chromeos/network/onc/onc_translation_tables.cc
+++ b/chromeos/network/onc/onc_translation_tables.cc
@@ -7,6 +7,8 @@
#include <cstddef>
#include "base/logging.h"
+#include "chromeos/network/network_type_pattern.h"
+#include "chromeos/network/tether_constants.h"
#include "components/onc/onc_constants.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
@@ -109,6 +111,12 @@ const FieldTranslationEntry vpn_fields[] = {
// { ::onc::vpn::kType, shill::kProviderTypeProperty },
{NULL}};
+const FieldTranslationEntry tether_fields[] = {
+ {::onc::tether::kBatteryPercentage, kTetherBatteryPercentage},
+ {::onc::tether::kCarrier, kTetherCarrier},
+ {::onc::tether::kSignalStrength, kTetherSignalStrength},
+ {NULL}};
+
const FieldTranslationEntry wifi_fields[] = {
{::onc::wifi::kAutoConnect, shill::kAutoConnectProperty},
{::onc::wifi::kBSSID, shill::kWifiBSsid},
@@ -239,6 +247,7 @@ const OncValueTranslationEntry onc_value_translation_table[] = {
{&kOpenVPNSignature, openvpn_fields},
{&kVerifyX509Signature, verify_x509_fields},
{&kVPNSignature, vpn_fields},
+ {&kTetherSignature, tether_fields},
{&kWiFiSignature, wifi_fields},
{&kWiFiWithStateSignature, wifi_fields},
{&kWiMAXSignature, wimax_fields},
@@ -283,6 +292,7 @@ const StringTranslationEntry kNetworkTypeTable[] = {
{::onc::network_type::kWimax, shill::kTypeWimax},
{::onc::network_type::kCellular, shill::kTypeCellular},
{::onc::network_type::kVPN, shill::kTypeVPN},
+ {::onc::network_type::kTether, kTypeTether},
{NULL}};
const StringTranslationEntry kVPNTypeTable[] = {
« no previous file with comments | « chromeos/network/onc/onc_signature.cc ('k') | chromeos/network/onc/onc_translator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698