Commit e8e89d55 authored by khorimoto's avatar khorimoto Committed by Commit bot

[CrOS Tether] Add tether network properties (battery percentage, carrier, and...

[CrOS Tether] Add tether network properties (battery percentage, carrier, and signal strength) to the Chrome OS networking stack.

This change is composed of several related parts:
(1) Update the chrome.networkingPrivate API to include tethering properties as part of NetworkProperties, ManagedNetworkProperties, and NetworkStateProperties.
(2) Add ONC properties for the new tethering properties.
(3) Add ONC validation for tether networks.
(4) Add "fake" Shill tethering properties (since tethering networks are really normal Wi-Fi networks, Shill does not actually ever use the properties).
(5) Add translation from Shill tethering properties to ONC tethering properties.
(6) Update the settings page's chrome.networkingPrivate.getNetworks() call site to handle tether networks properly.

BUG=672263
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2818593003
Cr-Commit-Position: refs/heads/master@{#465749}
parent a4be5c70
......@@ -415,6 +415,8 @@ component("chromeos") {
"network/shill_property_handler.h",
"network/shill_property_util.cc",
"network/shill_property_util.h",
"network/tether_constants.cc",
"network/tether_constants.h",
"printing/ppd_cache.cc",
"printing/ppd_cache.h",
"printing/ppd_provider.cc",
......
......@@ -25,6 +25,7 @@
#include "chromeos/network/network_event_log.h"
#include "chromeos/network/network_state.h"
#include "chromeos/network/network_state_handler_observer.h"
#include "chromeos/network/tether_constants.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
namespace chromeos {
......
......@@ -7,12 +7,11 @@
#include <stddef.h>
#include "chromeos/network/network_event_log.h"
#include "chromeos/network/tether_constants.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
namespace chromeos {
const char kTypeTether[] = "wifi-tether";
namespace {
const char kPatternDefault[] = "PatternDefault";
......@@ -20,6 +19,7 @@ const char kPatternEthernet[] = "PatternEthernet";
const char kPatternWireless[] = "PatternWireless";
const char kPatternMobile[] = "PatternMobile";
const char kPatternNonVirtual[] = "PatternNonVirtual";
const char kPatternTether[] = "PatternTether";
enum NetworkTypeBitFlag {
kNetworkTypeNone = 0,
......@@ -141,6 +141,8 @@ std::string NetworkTypePattern::ToDebugString() const {
return kPatternMobile;
if (Equals(NonVirtual()))
return kPatternNonVirtual;
if (Equals(Tether()))
return kPatternTether;
std::string str;
for (size_t i = 0; i < arraysize(shill_type_to_flag); ++i) {
......
......@@ -12,9 +12,6 @@
namespace chromeos {
// A special case non-shill type.
CHROMEOS_EXPORT extern const char kTypeTether[];
class CHROMEOS_EXPORT NetworkTypePattern {
public:
// Matches any network.
......
......@@ -4,6 +4,7 @@
#include "chromeos/network/network_type_pattern.h"
#include "chromeos/network/tether_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
......
......@@ -166,6 +166,12 @@ const OncFieldSignature ethernet_fields[] = {
{::onc::ethernet::kEAP, &kEAPSignature},
{NULL}};
const OncFieldSignature tether_fields[] = {
{::onc::tether::kBatteryPercentage, &kIntegerSignature},
{::onc::tether::kCarrier, &kStringSignature},
{::onc::tether::kSignalStrength, &kIntegerSignature},
{NULL}};
const OncFieldSignature ipconfig_fields[] = {
{::onc::ipconfig::kGateway, &kStringSignature},
{::onc::ipconfig::kIPAddress, &kStringSignature},
......@@ -328,6 +334,7 @@ const OncFieldSignature network_with_state_fields[] = {
{::onc::network_config::kRestrictedConnectivity, &kBoolSignature},
{::onc::network_config::kSavedIPConfig, &kSavedIPConfigSignature},
{::onc::network_config::kSource, &kStringSignature},
{::onc::network_config::kTether, &kTetherSignature},
{::onc::network_config::kWiFi, &kWiFiWithStateSignature},
{::onc::network_config::kWimax, &kWiMAXWithStateSignature},
{NULL}};
......@@ -392,6 +399,8 @@ const OncValueSignature kVPNSignature = {base::Value::Type::DICTIONARY,
vpn_fields, NULL};
const OncValueSignature kEthernetSignature = {base::Value::Type::DICTIONARY,
ethernet_fields, NULL};
const OncValueSignature kTetherSignature = {base::Value::Type::DICTIONARY,
tether_fields, NULL};
const OncValueSignature kIPConfigSignature = {base::Value::Type::DICTIONARY,
ipconfig_fields, NULL};
const OncValueSignature kSavedIPConfigSignature = {
......
......@@ -46,6 +46,7 @@ CHROMEOS_EXPORT extern const OncValueSignature kThirdPartyVPNSignature;
CHROMEOS_EXPORT extern const OncValueSignature kVerifyX509Signature;
CHROMEOS_EXPORT extern const OncValueSignature kVPNSignature;
CHROMEOS_EXPORT extern const OncValueSignature kEthernetSignature;
CHROMEOS_EXPORT extern const OncValueSignature kTetherSignature;
CHROMEOS_EXPORT extern const OncValueSignature kIPConfigSignature;
CHROMEOS_EXPORT extern const OncValueSignature kSavedIPConfigSignature;
CHROMEOS_EXPORT extern const OncValueSignature kStaticIPConfigSignature;
......
......@@ -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[] = {
......
......@@ -117,6 +117,7 @@ INSTANTIATE_TEST_CASE_P(
"translation_of_shill_openvpn.onc"),
std::make_pair("shill_output_openvpn_with_errors.json",
"translation_of_shill_openvpn_with_errors.onc"),
std::make_pair("shill_tether.json", "tether.onc"),
std::make_pair("shill_wifi_with_state.json",
"translation_of_shill_wifi_with_state.onc"),
std::make_pair("shill_wifi_proxy.json",
......
......@@ -761,6 +761,8 @@ NetworkTypePattern NetworkTypePatternFromOncType(const std::string& type) {
return NetworkTypePattern::Cellular();
if (type == ::onc::network_type::kEthernet)
return NetworkTypePattern::Ethernet();
if (type == ::onc::network_type::kTether)
return NetworkTypePattern::Tether();
if (type == ::onc::network_type::kVPN)
return NetworkTypePattern::VPN();
if (type == ::onc::network_type::kWiFi)
......
......@@ -129,6 +129,8 @@ std::unique_ptr<base::DictionaryValue> Validator::MapObject(
valid = ValidateEAP(repaired.get());
} else if (&signature == &kCertificateSignature) {
valid = ValidateCertificate(repaired.get());
} else if (&signature == &kTetherSignature) {
valid = ValidateTether(repaired.get());
}
}
......@@ -547,11 +549,10 @@ bool Validator::ValidateToplevelConfiguration(base::DictionaryValue* result) {
bool Validator::ValidateNetworkConfiguration(base::DictionaryValue* result) {
using namespace ::onc::network_config;
const char* const kValidTypes[] = {::onc::network_type::kEthernet,
::onc::network_type::kVPN,
::onc::network_type::kWiFi,
::onc::network_type::kCellular,
::onc::network_type::kWimax};
const char* const kValidTypes[] = {
::onc::network_type::kEthernet, ::onc::network_type::kVPN,
::onc::network_type::kWiFi, ::onc::network_type::kCellular,
::onc::network_type::kWimax, ::onc::network_type::kTether};
const std::vector<const char*> valid_types(toVector(kValidTypes));
const char* const kValidIPConfigTypes[] = {kIPConfigTypeDHCP,
kIPConfigTypeStatic};
......@@ -616,6 +617,9 @@ bool Validator::ValidateNetworkConfiguration(base::DictionaryValue* result) {
RequireField(*result, ::onc::network_config::kWimax);
} else if (type == ::onc::network_type::kVPN) {
all_required_exist &= RequireField(*result, ::onc::network_config::kVPN);
} else if (type == ::onc::network_type::kTether) {
all_required_exist &=
RequireField(*result, ::onc::network_config::kTether);
}
}
......@@ -898,7 +902,7 @@ bool Validator::ValidateGlobalNetworkConfiguration(
// Ensure the list contains only legitimate network type identifiers.
const char* const kValidNetworkTypeValues[] = {kCellular, kEthernet, kWiFi,
kWimax};
kWimax, kTether};
const std::vector<const char*> valid_network_type_values(
toVector(kValidNetworkTypeValues));
if (!ListFieldContainsValidValues(*result, kDisableNetworkTypes,
......@@ -1015,6 +1019,39 @@ bool Validator::ValidateCertificate(base::DictionaryValue* result) {
return !error_on_missing_field_ || all_required_exist;
}
bool Validator::ValidateTether(base::DictionaryValue* result) {
using namespace ::onc::tether;
int batteryPercentage;
if (!result->GetIntegerWithoutPathExpansion(kBatteryPercentage,
&batteryPercentage) ||
batteryPercentage < 0 || batteryPercentage > 100) {
// Battery percentage must be present and within [0, 100].
error_or_warning_found_ = true;
return false;
}
int signalStrength;
if (!result->GetIntegerWithoutPathExpansion(kSignalStrength,
&signalStrength) ||
signalStrength < 0 || signalStrength > 100) {
// Signal strength must be present and within [0, 100].
error_or_warning_found_ = true;
return false;
}
std::string carrier;
if (!result->GetStringWithoutPathExpansion(kCarrier, &carrier) ||
carrier.empty()) {
// Carrier must be a non-empty string.
error_or_warning_found_ = true;
return false;
}
// No required fields.
return true;
}
std::string Validator::MessageHeader() {
std::string path = path_.empty() ? "toplevel" : base::JoinString(path_, ".");
std::string message = "At " + path + ": ";
......
......@@ -171,6 +171,7 @@ class CHROMEOS_EXPORT Validator : public Mapper {
bool ValidateProxyLocation(base::DictionaryValue* result);
bool ValidateEAP(base::DictionaryValue* result);
bool ValidateCertificate(base::DictionaryValue* result);
bool ValidateTether(base::DictionaryValue* result);
bool IsValidValue(const std::string& field_value,
const std::vector<const char*>& valid_values);
......
......@@ -222,7 +222,8 @@ INSTANTIATE_TEST_CASE_P(
false),
OncParams("third_party_vpn.onc",
&kNetworkConfigurationSignature,
false)));
false),
OncParams("tether.onc", &kNetworkWithStateSignature, false)));
namespace {
......@@ -551,6 +552,34 @@ INSTANTIATE_TEST_CASE_P(
std::make_pair(OncParams("openvpn-invalid-verify-x509-type",
&kNetworkConfigurationSignature,
false),
ExpectBothNotValid("", "")),
std::make_pair(OncParams("tether-missing-battery-percentage",
&kNetworkWithStateSignature,
true),
ExpectBothNotValid("", "")),
std::make_pair(OncParams("tether-negative-battery",
&kNetworkWithStateSignature,
true),
ExpectBothNotValid("", "")),
std::make_pair(OncParams("tether-battery-over-100",
&kNetworkWithStateSignature,
true),
ExpectBothNotValid("", "")),
std::make_pair(OncParams("tether-missing-carrier",
&kNetworkWithStateSignature,
true),
ExpectBothNotValid("", "")),
std::make_pair(OncParams("tether-missing-signal-strength",
&kNetworkWithStateSignature,
true),
ExpectBothNotValid("", "")),
std::make_pair(OncParams("tether-negative-signal-strength",
&kNetworkWithStateSignature,
true),
ExpectBothNotValid("", "")),
std::make_pair(OncParams("tether-signal-strength-over-100",
&kNetworkWithStateSignature,
true),
ExpectBothNotValid("", ""))));
} // namespace onc
......
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/network/tether_constants.h"
namespace chromeos {
const char kTypeTether[] = "wifi-tether";
const char kTetherBatteryPercentage[] = "Tether.BatteryPercentage";
const char kTetherCarrier[] = "Tether.Carrier";
const char kTetherSignalStrength[] = "Tether.SignalStrength";
} // namespace chromeos
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROMEOS_NETWORK_TETHER_CONSTANTS_H_
#define CHROMEOS_NETWORK_TETHER_CONSTANTS_H_
#include "chromeos/chromeos_export.h"
namespace chromeos {
// This file contains constants for Chrome OS tether networks which are used
// wherever Shill constants are appropriate. Tether networks are a Chrome OS
// concept which does not exist as part of Shill, so these custom definitions
// are used instead. Tether networks are never intended to be passed to Shill
// code, so these constants are used primarily as part of NetworkStateHandler.
// Represents the tether network type.
CHROMEOS_EXPORT extern const char kTypeTether[];
// Properties associated with tether networks.
CHROMEOS_EXPORT extern const char kTetherBatteryPercentage[];
CHROMEOS_EXPORT extern const char kTetherCarrier[];
CHROMEOS_EXPORT extern const char kTetherSignalStrength[];
} // namespace chromeos
#endif // CHROMEOS_NETWORK_TETHER_CONSTANTS_H_
......@@ -399,6 +399,73 @@
}
}
},
"tether-missing-battery-percentage": {
"GUID": "guid",
"Name": "name",
"Type": "Tether",
"Tether": {
"Carrier": "Project Fi",
"SignalStrength": 75
}
},
"tether-negative-battery": {
"GUID": "guid",
"Name": "name",
"Type": "Tether",
"Tether": {
"BatteryPercentage": -1,
"Carrier": "Project Fi",
"SignalStrength": 75
}
},
"tether-battery-over-100": {
"GUID": "guid",
"Name": "name",
"Type": "Tether",
"Tether": {
"BatteryPercentage": 101,
"Carrier": "Project Fi",
"SignalStrength": 75
}
},
"tether-missing-carrier": {
"GUID": "guid",
"Name": "name",
"Type": "Tether",
"Tether": {
"BatteryPercentage": 85,
"SignalStrength": 75
}
},
"tether-missing-signal-strength": {
"GUID": "guid",
"Name": "name",
"Type": "Tether",
"Tether": {
"BatteryPercentage": 85,
"Carrier": "Project Fi"
}
},
"tether-negative-signal-strength": {
"GUID": "guid",
"Name": "name",
"Type": "Tether",
"Tether": {
"BatteryPercentage": 85,
"Carrier": "Project Fi",
"SignalStrength": -1
}
},
"tether-signal-strength-over-100": {
"GUID": "guid",
"Name": "name",
"Type": "Tether",
"Tether": {
"BatteryPercentage": 85,
"Carrier": "Project Fi",
"SignalStrength": 101
}
},
"third-party-vpn-missing-extension-id": {
"GUID": "guid",
"Name": "third-party VPN",
......
{
"Type": "wifi-tether",
"Name": "Tether Network",
"Tether.BatteryPercentage": 85,
"Tether.Carrier": "Project Fi",
"Tether.SignalStrength": 75
}
{
"Type": "Tether",
"Name": "Tether Network",
"Tether": {
"BatteryPercentage": 85,
"Carrier": "Project Fi",
"SignalStrength": 75
}
}
......@@ -230,6 +230,11 @@ Field **NetworkConfigurations** is an array of
[Cellular](#Cellular-type)
* Cellular settings.
* **Tether**
* (required if **Type** is *Tether*, otherwise ignored) -
[Tether](#Tether-type)
* Tether settings.
* **Type**
* (required if **Remove** is *false*, otherwise ignored) - **string**
* `Allowed values are` *Cellular*,
......@@ -1426,6 +1431,34 @@ ONC configuration of of **Cellular** networks is not yet supported.
changes to *sim-puk*).
## Tether Networks
For Tether connections, **Type** must be set to *Tether* and the
field **Tether** must be set to an object of type [Tether](#Tether-type).
Used for representing a tether hotspot provided by an external device, e.g.
a phone.
### Tether type
* **BatteryPercentage**
* (optional, read-only) - **integer**
* The battery percentage of the device providing the tether hotspot in the
range [0, 100].
* **Carrier**
* (optional, read-only) - **string**
* The name of the cellular carrier when the hotspot is provided by a
cellular connection.
* **SignalStrength**
* (optional, read-only) - **integer**
* The current signal strength for the hotspot's connection in the range
[0, 100]. Note that this value refers to the strength of the signal
between the external device and its data provider, not the strength of the
signal between the current device and the external device.
## Bluetooth / WiFi Direct Networks
This format will eventually also cover configuration of Bluetooth and WiFi
......
......@@ -59,6 +59,7 @@ const char kSourceUser[] = "User";
const char kSourceUserPolicy[] = "UserPolicy";
const char kSource[] = "Source";
const char kStaticIPConfig[] = "StaticIPConfig";
const char kTether[] = "Tether";
const char kType[] = "Type";
const char kVPN[] = "VPN";
const char kWiFi[] = "WiFi";
......@@ -68,6 +69,10 @@ std::string CellularProperty(const std::string& property) {
return std::string(kCellular) + "." + property;
}
std::string TetherProperty(const std::string& property) {
return std::string(kTether) + "." + property;
}
std::string VpnProperty(const std::string& property) {
return std::string(kVPN) + "." + property;
}
......@@ -82,6 +87,7 @@ namespace network_type {
const char kAllTypes[] = "All";
const char kCellular[] = "Cellular";
const char kEthernet[] = "Ethernet";
const char kTether[] = "Tether";
const char kVPN[] = "VPN";
const char kWiFi[] = "WiFi";
const char kWimax[] = "WiMAX";
......@@ -188,6 +194,12 @@ const char kEAP[] = "EAP";
const char k8021X[] = "8021X";
} // namespace ethernet
namespace tether {
const char kBatteryPercentage[] = "BatteryPercentage";
const char kCarrier[] = "Carrier";
const char kSignalStrength[] = "SignalStrength";
} // namespace tether
namespace ipconfig {
const char kGateway[] = "Gateway";
const char kIPAddress[] = "IPAddress";
......
......@@ -82,12 +82,14 @@ ONC_EXPORT extern const char kConnectionState[];
ONC_EXPORT extern const char kRestrictedConnectivity[];
ONC_EXPORT extern const char kConnectable[];
ONC_EXPORT extern const char kErrorState[];
ONC_EXPORT extern const char kTether[];
ONC_EXPORT extern const char kType[];
ONC_EXPORT extern const char kVPN[];
ONC_EXPORT extern const char kWiFi[];
ONC_EXPORT extern const char kWimax[];
ONC_EXPORT extern std::string CellularProperty(const std::string& property);
ONC_EXPORT extern std::string TetherProperty(const std::string& property);
ONC_EXPORT extern std::string VpnProperty(const std::string& property);
ONC_EXPORT extern std::string WifiProperty(const std::string& property);
......@@ -96,6 +98,7 @@ ONC_EXPORT extern std::string WifiProperty(const std::string& property);
namespace network_type {
ONC_EXPORT extern const char kCellular[];
ONC_EXPORT extern const char kEthernet[];
ONC_EXPORT extern const char kTether[];
ONC_EXPORT extern const char kVPN[];
ONC_EXPORT extern const char kWiFi[];
ONC_EXPORT extern const char kWimax[];
......@@ -216,6 +219,12 @@ ONC_EXPORT extern const char kEAP[];
ONC_EXPORT extern const char k8021X[];
} // namespace ethernet
namespace tether {
ONC_EXPORT extern const char kBatteryPercentage[];
ONC_EXPORT extern const char kCarrier[];
ONC_EXPORT extern const char kSignalStrength[];
} // namespace tether
namespace wifi {
ONC_EXPORT extern const char kAllowGatewayARPPolling[];
ONC_EXPORT extern const char kAutoConnect[];
......
......@@ -58,7 +58,7 @@ namespace networkingPrivate {
};
enum NetworkType {
All, Cellular, Ethernet, VPN, Wireless, WiFi, WiMAX
All, Cellular, Ethernet, Tether, VPN, Wireless, WiFi, WiMAX
};
enum ProxySettingsType {
......@@ -202,14 +202,14 @@ namespace networkingPrivate {
DOMString? CommonName;
DOMString? Locality;
DOMString? Organization;
DOMString? OrganizationalUnit;
DOMString? OrganizationalUnit;
};
dictionary ManagedIssuerSubjectPattern {
ManagedDOMString? CommonName;
ManagedDOMString? Locality;
ManagedDOMString? Organization;
ManagedDOMString? OrganizationalUnit;
ManagedDOMString? OrganizationalUnit;
};
dictionary CertificatePattern {
......@@ -574,6 +574,18 @@ namespace networkingPrivate {
DOMString Authentication;
};
dictionary TetherProperties {
long? BatteryPercentage;
DOMString? Carrier;
long? SignalStrength;
};
dictionary ManagedTetherProperties {
ManagedLong? BatteryPercentage;
ManagedDOMString? Carrier;
ManagedLong? SignalStrength;
};
dictionary VPNProperties {
boolean? AutoConnect;
DOMString? Host;
......@@ -689,6 +701,7 @@ namespace networkingPrivate {
IPConfigProperties? StaticIPConfig;
IPConfigProperties? SavedIPConfig;
DOMString? Source;
TetherProperties? Tether;
NetworkType Type;
VPNProperties? VPN;
WiFiProperties? WiFi;
......@@ -713,6 +726,7 @@ namespace networkingPrivate {
ManagedIPConfigProperties? StaticIPConfig;
IPConfigProperties? SavedIPConfig;
DOMString? Source;
ManagedTetherProperties? Tether;
NetworkType Type;
ManagedVPNProperties? VPN;
ManagedWiFiProperties? WiFi;
......@@ -729,6 +743,7 @@ namespace networkingPrivate {
DOMString? Name;
long? Priority;
DOMString? Source;
TetherProperties? Tether;
NetworkType Type;
VPNStateProperties? VPN;
WiFiStateProperties? WiFi;
......
......@@ -78,6 +78,7 @@ chrome.networkingPrivate.NetworkType = {
ALL: 'All',
CELLULAR: 'Cellular',
ETHERNET: 'Ethernet',
TETHER: 'Tether',
VPN: 'VPN',
WIRELESS: 'Wireless',
WI_FI: 'WiFi',
......@@ -760,6 +761,26 @@ chrome.networkingPrivate.ManagedEthernetProperties;
*/
chrome.networkingPrivate.EthernetStateProperties;
/**
* @typedef {{
* BatteryPercentage: (number|undefined),
* Carrier: (string|undefined),
* SignalStrength: (number|undefined)
* }}
* @see https://developer.chrome.com/extensions/networkingPrivate#type-TetherProperties
*/
chrome.networkingPrivate.TetherProperties;
/**
* @typedef {{
* BatteryPercentage: (!chrome.networkingPrivate.ManagedLong|undefined),
* Carrier: (!chrome.networkingPrivate.ManagedDOMString|undefined),
* SignalStrength: (!chrome.networkingPrivate.ManagedLong|undefined)
* }}
* @see https://developer.chrome.com/extensions/networkingPrivate#type-ManagedTetherProperties
*/
chrome.networkingPrivate.ManagedTetherProperties;
/**
* @typedef {{
* AutoConnect: (boolean|undefined),
......@@ -916,6 +937,7 @@ chrome.networkingPrivate.NetworkConfigProperties;
* StaticIPConfig: (!chrome.networkingPrivate.IPConfigProperties|undefined),
* SavedIPConfig: (!chrome.networkingPrivate.IPConfigProperties|undefined),
* Source: (string|undefined),
* Tether: (!chrome.networkingPrivate.TetherProperties|undefined),
* Type: !chrome.networkingPrivate.NetworkType,
* VPN: (!chrome.networkingPrivate.VPNProperties|undefined),
* WiFi: (!chrome.networkingPrivate.WiFiProperties|undefined),
......@@ -944,6 +966,7 @@ chrome.networkingPrivate.NetworkProperties;
* StaticIPConfig: (!chrome.networkingPrivate.ManagedIPConfigProperties|undefined),
* SavedIPConfig: (!chrome.networkingPrivate.IPConfigProperties|undefined),
* Source: (string|undefined),
* Tether: (!chrome.networkingPrivate.ManagedTetherProperties|undefined),
* Type: !chrome.networkingPrivate.NetworkType,
* VPN: (!chrome.networkingPrivate.ManagedVPNProperties|undefined),
* WiFi: (!chrome.networkingPrivate.ManagedWiFiProperties|undefined),
......@@ -964,6 +987,7 @@ chrome.networkingPrivate.ManagedProperties;
* Name: (string|undefined),
* Priority: (number|undefined),
* Source: (string|undefined),
* Tether: (!chrome.networkingPrivate.TetherProperties|undefined),
* Type: !chrome.networkingPrivate.NetworkType,
* VPN: (!chrome.networkingPrivate.VPNStateProperties|undefined),
* WiFi: (!chrome.networkingPrivate.WiFiStateProperties|undefined),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment