chrome.networkingPrivate

Description: The chrome.networkingPrivate API is used for configuring network connections (Cellular, Ethernet, VPN, WiFi or WiMAX). This private API is only valid if called from a browser or app associated with the primary user. See the Open Network Configuration (ONC) documentation for descriptions of properties: src/components/onc/docs/onc_spec.html, or the Open Network Configuration page at chromium.org.

NOTE: Most dictionary properties and enum values use UpperCamelCase to match the ONC spec instead of the JavaScript lowerCamelCase convention.

"State" properties describe just the ONC properties returned by networkingPrivate.getState and networkingPrivate.getNetworks.

"Config" properties describe just the ONC properties that can be configured through this API. NOTE: Not all configuration properties are exposed at this time, only those currently required by the Chrome Settings UI. TODO(stevenjb): Provide all configuration properties and types, crbug.com/380937.

TODO(stevenjb/pneubeck): Merge the ONC documentation with this document and use it as the ONC specification.
Availability: Since Chrome 28.
Permissions: "networkingPrivate"

Implemention of the Chrome Networking Private API

The Networking Private API is designed to allow whitelisted apps and extensions to view and configure the networks available on a device.

The API uses Open Network Configuration to describe network types and properties.

Note: The networkingPrivate API is in active development and is primarily supported on Chrome OS, with a subset supported on Windows and OSX for WiFi configuration. It is currently only available to whitelisted apps.

Summary

Types
ActivationStateType
CaptivePortalStatus
ConnectionStateType
IPConfigType
NetworkType
ProxySettingsType
ManagedBoolean
ManagedLong
ManagedDOMString
ManagedDOMStringList
ManagedIPConfigType
APNProperties
CellularProviderProperties
IssuerSubjectPattern
ManagedIssuerSubjectPattern
CertificatePattern
ManagedCertificatePattern
EAPProperties
ManagedEAPProperties
FoundNetworkProperties
IPConfigProperties
IPSecProperties
PaymentPortal
ProxyLocation
ManagedProxyLocation
ProxySettings
SIMLockStatus
ThirdPartyVPNProperties
CellularProperties
EthernetProperties
TetherProperties
VPNProperties
WiFiProperties
WiMAXProperties
NetworkConfigProperties
NetworkStateProperties
VerificationProperties
Certificate
Methods
getProperties chrome.networkingPrivate.getProperties(string networkGuid, function callback)
getManagedProperties chrome.networkingPrivate.getManagedProperties(string networkGuid, function callback)
getState chrome.networkingPrivate.getState(string networkGuid, function callback)
setProperties chrome.networkingPrivate.setProperties(string networkGuid, NetworkConfigProperties properties, function callback)
createNetwork chrome.networkingPrivate.createNetwork(boolean shared, NetworkConfigProperties properties, function callback)
forgetNetwork chrome.networkingPrivate.forgetNetwork(string networkGuid, function callback)
getNetworks chrome.networkingPrivate.getNetworks(object filter, function callback)
getVisibleNetworks chrome.networkingPrivate.getVisibleNetworks( NetworkType networkType, function callback)
getEnabledNetworkTypes chrome.networkingPrivate.getEnabledNetworkTypes(function callback)
getDeviceStates chrome.networkingPrivate.getDeviceStates(function callback)
enableNetworkType chrome.networkingPrivate.enableNetworkType( NetworkType networkType)
disableNetworkType chrome.networkingPrivate.disableNetworkType( NetworkType networkType)
requestNetworkScan chrome.networkingPrivate.requestNetworkScan()
startConnect chrome.networkingPrivate.startConnect(string networkGuid, function callback)
startDisconnect chrome.networkingPrivate.startDisconnect(string networkGuid, function callback)
startActivate chrome.networkingPrivate.startActivate(string networkGuid, string carrier, function callback)
getCaptivePortalStatus chrome.networkingPrivate.getCaptivePortalStatus(string networkGuid, function callback)
unlockCellularSim chrome.networkingPrivate.unlockCellularSim(string networkGuid, string pin, string puk, function callback)
setCellularSimState chrome.networkingPrivate.setCellularSimState(string networkGuid, object simState, function callback)
getGlobalPolicy chrome.networkingPrivate.getGlobalPolicy(function callback)
getCertificateLists chrome.networkingPrivate.getCertificateLists(function callback)
Events
onNetworksChanged
onNetworkListChanged
onDeviceStateListChanged
onPortalDetectionCompleted
onCertificateListsChanged

Types

ActivationStateType

Enum
"Activated", "Activating", "NotActivated", or "PartiallyActivated"

CaptivePortalStatus

Enum
"Unknown", "Offline", "Online", "Portal", or "ProxyAuthRequired"

ConnectionStateType

Enum
"Connected", "Connecting", or "NotConnected"

IPConfigType

Enum
"DHCP", or "Static"

NetworkType

Enum
"All", "Cellular", "Ethernet", "Tether", "VPN", "Wireless", "WiFi", or "WiMAX"

ProxySettingsType

Enum
"Direct", "Manual", "PAC", or "WPAD"

ManagedBoolean

Since Chrome 47.

properties
boolean (optional) Active
string (optional) Effective
boolean (optional) UserPolicy
boolean (optional) DevicePolicy
boolean (optional) UserSetting
boolean (optional) SharedSetting
boolean (optional) UserEditable
boolean (optional) DeviceEditable

ManagedLong

Since Chrome 47.

properties
integer (optional) Active
string (optional) Effective
integer (optional) UserPolicy
integer (optional) DevicePolicy
integer (optional) UserSetting
integer (optional) SharedSetting
boolean (optional) UserEditable
boolean (optional) DeviceEditable

ManagedDOMString

Since Chrome 47.

properties
string (optional) Active
string (optional) Effective
string (optional) UserPolicy
string (optional) DevicePolicy
string (optional) UserSetting
string (optional) SharedSetting
boolean (optional) UserEditable
boolean (optional) DeviceEditable

ManagedDOMStringList

Since Chrome 47.

properties
array of string (optional) Active
string (optional) Effective
array of string (optional) UserPolicy
array of string (optional) DevicePolicy
array of string (optional) UserSetting
array of string (optional) SharedSetting
boolean (optional) UserEditable
boolean (optional) DeviceEditable

ManagedIPConfigType

Since Chrome 47.

properties
IPConfigType (optional) Active
string (optional) Effective
IPConfigType (optional) UserPolicy
IPConfigType (optional) DevicePolicy
IPConfigType (optional) UserSetting
IPConfigType (optional) SharedSetting
boolean (optional) UserEditable
boolean (optional) DeviceEditable

APNProperties

Since Chrome 43.

properties
string AccessPointName
string (optional) Language
string (optional) LocalizedName
string (optional) Name
string (optional) Password
string (optional) Username

CellularProviderProperties

Since Chrome 47.

properties
string Name
string Code
string (optional) Country

IssuerSubjectPattern

Since Chrome 47.

properties
string (optional) CommonName
string (optional) Locality
string (optional) Organization
string (optional) OrganizationalUnit

ManagedIssuerSubjectPattern

Since Chrome 47.

properties
ManagedDOMString (optional) CommonName
ManagedDOMString (optional) Locality
ManagedDOMString (optional) Organization
ManagedDOMString (optional) OrganizationalUnit

CertificatePattern

Since Chrome 47.

properties
array of string (optional) EnrollmentURI
IssuerSubjectPattern (optional) Issuer
array of string (optional) IssuerCARef
IssuerSubjectPattern (optional) Subject

ManagedCertificatePattern

Since Chrome 47.

properties
ManagedDOMStringList (optional) EnrollmentURI
ManagedIssuerSubjectPattern (optional) Issuer
ManagedDOMStringList (optional) IssuerCARef
ManagedIssuerSubjectPattern (optional) Subject

EAPProperties

Since Chrome 47.

properties
string (optional) AnonymousIdentity
CertificatePattern (optional) ClientCertPattern
string (optional) ClientCertPKCS11Id

Since Chrome 60. Warning: this is the current Dev channel. Learn more.

string (optional) ClientCertRef
string (optional) ClientCertType
string (optional) Identity
string (optional) Inner
string (optional) Outer

The outer EAP type. Required by ONC, but may not be provided when translating from Shill.

string (optional) Password
boolean (optional) SaveCredentials
array of string (optional) ServerCAPEMs

Since Chrome 59. Warning: this is the current Beta channel. Learn more.

array of string (optional) ServerCARefs
string (optional) SubjectMatch

Since Chrome 60. Warning: this is the current Dev channel. Learn more.

boolean (optional) UseProactiveKeyCaching
boolean (optional) UseSystemCAs

ManagedEAPProperties

Since Chrome 47.

properties
ManagedDOMString (optional) AnonymousIdentity
ManagedCertificatePattern (optional) ClientCertPattern
ManagedDOMString (optional) ClientCertPKCS11Id

Since Chrome 60. Warning: this is the current Dev channel. Learn more.

ManagedDOMString (optional) ClientCertRef
ManagedDOMString (optional) ClientCertType
ManagedDOMString (optional) Identity
ManagedDOMString (optional) Inner
ManagedDOMString (optional) Outer

The outer EAP type. Required by ONC, but may not be provided when translating from Shill.

ManagedDOMString (optional) Password
ManagedBoolean (optional) SaveCredentials
ManagedDOMStringList (optional) ServerCAPEMs

Since Chrome 59. Warning: this is the current Beta channel. Learn more.

ManagedDOMStringList (optional) ServerCARefs
ManagedDOMString (optional) SubjectMatch

Since Chrome 60. Warning: this is the current Dev channel. Learn more.

ManagedBoolean (optional) UseProactiveKeyCaching
ManagedBoolean (optional) UseSystemCAs

FoundNetworkProperties

Since Chrome 47.

properties
string Status
string NetworkId
string Technology
string (optional) ShortName
string (optional) LongName

IPConfigProperties

Since Chrome 43.

properties
string (optional) Gateway
string (optional) IPAddress
array of string (optional) NameServers
integer (optional) RoutingPrefix
string (optional) Type
string (optional) WebProxyAutoDiscoveryUrl

IPSecProperties

Since Chrome 43.

properties
string AuthenticationType
CertificatePattern (optional) ClientCertPattern

Since Chrome 47.

string (optional) ClientCertRef

Since Chrome 47.

string (optional) ClientCertType

Since Chrome 47.

EAPProperties (optional) EAP

Since Chrome 47.

string (optional) Group

Since Chrome 47.

integer (optional) IKEVersion

Since Chrome 47.

string (optional) PSK

Since Chrome 47.

boolean (optional) SaveCredentials

Since Chrome 47.

array of string (optional) ServerCARefs

Since Chrome 47.

object (optional) XAUTH

Since Chrome 47.

string (optional) Password
boolean (optional) SaveCredentials
string (optional) Username

PaymentPortal

Since Chrome 47.

properties
string Method
string (optional) PostData
string (optional) Url

ProxyLocation

Since Chrome 45.

properties
string Host
integer Port

ManagedProxyLocation

Since Chrome 47.

properties
ManagedDOMString Host
ManagedLong Port

ProxySettings

Since Chrome 45.

properties
ProxySettingsType Type
object (optional) Manual
ProxyLocation (optional) HTTPProxy
ProxyLocation (optional) SecureHTTPProxy
ProxyLocation (optional) FTPProxy
ProxyLocation (optional) SOCKS
array of string (optional) ExcludeDomains
string (optional) PAC

SIMLockStatus

Since Chrome 47.

properties
string LockType
boolean LockEnabled

sim-pin, sim-puk, or ''

integer (optional) RetriesLeft

ThirdPartyVPNProperties

Since Chrome 43.

properties
string ExtensionID
string (optional) ProviderName

Since Chrome 47.

CellularProperties

Since Chrome 47.

properties
boolean (optional) AutoConnect
APNProperties (optional) APN
array of APNProperties (optional) APNList
string (optional) ActivationType
ActivationStateType (optional) ActivationState
boolean (optional) AllowRoaming
string (optional) Carrier
string (optional) ESN
string (optional) Family
string (optional) FirmwareRevision
array of FoundNetworkProperties (optional) FoundNetworks
string (optional) HardwareRevision
CellularProviderProperties (optional) HomeProvider
string (optional) ICCID
string (optional) IMEI
APNProperties (optional) LastGoodAPN
string (optional) Manufacturer
string (optional) MDN
string (optional) MEID
string (optional) MIN
string (optional) ModelID
string (optional) NetworkTechnology
PaymentPortal (optional) PaymentPortal
integer (optional) PRLVersion
string (optional) RoamingState
CellularProviderProperties (optional) ServingOperator
SIMLockStatus (optional) SIMLockStatus
boolean (optional) SIMPresent
integer (optional) SignalStrength

Since Chrome 57.

boolean (optional) SupportNetworkScan
array of string (optional) SupportedCarriers

EthernetProperties

Since Chrome 47.

properties
boolean (optional) AutoConnect

Since Chrome 48.

string (optional) Authentication
EAPProperties (optional) EAP

TetherProperties

Since Chrome 60. Warning: this is the current Dev channel. Learn more.

properties
integer (optional) BatteryPercentage
string (optional) Carrier
boolean HasConnectedToHost
integer (optional) SignalStrength

VPNProperties

Since Chrome 47.

properties
boolean (optional) AutoConnect
string (optional) Host
IPSecProperties (optional) IPsec
object (optional) L2TP
boolean (optional) LcpEchoDisabled
string (optional) Password
boolean (optional) SaveCredentials
string (optional) Username
object (optional) OpenVPN
string (optional) Auth
string (optional) AuthRetry
boolean (optional) AuthNoCache
string (optional) Cipher
string (optional) ClientCertRef
CertificatePattern (optional) ClientCertPattern
string (optional) ClientCertType
string (optional) CompLZO
boolean (optional) CompNoAdapt
boolean (optional) IgnoreDefaultRoute
string (optional) KeyDirection
string (optional) NsCertType
string (optional) OTP
string (optional) Password
integer (optional) Port
string (optional) Proto
string (optional) PushPeerInfo
string (optional) RemoteCertEKU
array of string (optional) RemoteCertKU
string (optional) RemoteCertTLS
integer (optional) RenegSec
boolean (optional) SaveCredentials
array of string (optional) ServerCARefs
string (optional) ServerCertRef
integer (optional) ServerPollTimeout
integer (optional) Shaper
string (optional) StaticChallenge
string (optional) TLSAuthContents
string (optional) TLSRemote
string (optional) UserAuthenticationType
string (optional) Username
string (optional) Verb
string (optional) VerifyHash
object (optional) VerifyX509
string (optional) Name
string (optional) Type
ThirdPartyVPNProperties (optional) ThirdPartyVPN
string (optional) Type

WiFiProperties

Since Chrome 47.

properties
boolean (optional) AllowGatewayARPPolling
boolean (optional) AutoConnect
string (optional) BSSID
EAPProperties (optional) EAP
integer (optional) Frequency
array of integer (optional) FrequencyList
string (optional) HexSSID
boolean (optional) HiddenSSID
string (optional) Passphrase
integer (optional) RoamThreshold
string (optional) SSID
string (optional) Security
integer (optional) SignalStrength

WiMAXProperties

Since Chrome 47.

properties
boolean (optional) AutoConnect
EAPProperties (optional) EAP
integer (optional) SignalStrength

NetworkConfigProperties

Since Chrome 43.

properties
CellularProperties (optional) Cellular
EthernetProperties (optional) Ethernet

Since Chrome 47.

string (optional) GUID
IPConfigType (optional) IPAddressConfigType
string (optional) Name
IPConfigType (optional) NameServersConfigType
integer (optional) Priority
ProxySettings (optional) ProxySettings

Since Chrome 45.

IPConfigProperties (optional) StaticIPConfig
NetworkType (optional) Type
VPNProperties (optional) VPN
WiFiProperties (optional) WiFi
WiMAXProperties (optional) WiMAX

NetworkStateProperties

Since Chrome 43.

properties
object (optional) Cellular
ActivationStateType (optional) ActivationState
string (optional) NetworkTechnology
string (optional) RoamingState
boolean (optional) SIMPresent

Since Chrome 44.

integer (optional) SignalStrength
boolean (optional) Connectable
ConnectionStateType (optional) ConnectionState
object (optional) Ethernet
string Authentication
string (optional) ErrorState
string GUID
string (optional) Name
integer (optional) Priority
string (optional) Source
TetherProperties (optional) Tether

Since Chrome 60. Warning: this is the current Dev channel. Learn more.

NetworkType Type
object (optional) VPN
string Type
IPSecProperties (optional) IPsec
ThirdPartyVPNProperties (optional) ThirdPartyVPN
object (optional) WiFi
string (optional) BSSID

Since Chrome 50.

integer (optional) Frequency

Since Chrome 50.

string Security
integer (optional) SignalStrength
object (optional) WiMAX
integer (optional) SignalStrength

VerificationProperties

properties
string certificate

A string containing a PEM-encoded (including the 'BEGIN CERTIFICATE' header and 'END CERTIFICATE' footer) X.509 certificate for use in verifying the signed data.

array of string (optional) intermediateCertificates

Since Chrome 42.

An array of PEM-encoded X.509 intermediate certificate authority certificates. Each PEM-encoded certificate is expected to have the 'BEGIN CERTIFICATE' header and 'END CERTIFICATE' footer.

string publicKey

A string containing a base64-encoded RSAPublicKey ASN.1 structure, representing the public key to be used by verifyAndEncryptCredentials and verifyAndEncryptData methods.

string nonce

A string containing a base64-encoded random binary data for use in verifying the signed data.

string signedData

A string containing the identifying data string signed by the device.

string deviceSerial

A string containing the serial number of the device.

string deviceSsid

A string containing the SSID of the device. Should be empty for new configurations.

string deviceBssid

A string containing the BSSID of the device. Should be empty for new configurations.

Certificate

Since Chrome 60. Warning: this is the current Dev channel. Learn more.

properties
string hash

Unique hash for the certificate.

string issuedBy

Certificate issuer common name.

string issuedTo

Certificate name or nickname.

string (optional) pem

PEM for server CA certificates.

string (optional) PKCS11Id

PKCS#11 id for user certificates.

boolean hardwareBacked

Whether or not the certificate is hardware backed.

Methods

getProperties

chrome.networkingPrivate.getProperties(string networkGuid, function callback)

Gets all the properties of the network with id networkGuid. Includes all properties of the network (read-only and read/write values).

Parameters
string networkGuid

The GUID of the network to get properties for.

function callback

Called with the network properties when received.

The callback parameter should be a function that looks like this:

function(object result) {...};
object result
CellularProperties (optional) Cellular
boolean (optional) Connectable
ConnectionStateType (optional) ConnectionState
string (optional) ErrorState
EthernetProperties (optional) Ethernet
string GUID
IPConfigType (optional) IPAddressConfigType
array of IPConfigProperties (optional) IPConfigs
string (optional) MacAddress
string (optional) Name
IPConfigType (optional) NameServersConfigType
integer (optional) Priority
ProxySettings (optional) ProxySettings
boolean (optional) RestrictedConnectivity
IPConfigProperties (optional) StaticIPConfig
IPConfigProperties (optional) SavedIPConfig
string (optional) Source
TetherProperties (optional) Tether
NetworkType Type
VPNProperties (optional) VPN
WiFiProperties (optional) WiFi
WiMAXProperties (optional) WiMAX

getManagedProperties

chrome.networkingPrivate.getManagedProperties(string networkGuid, function callback)

Gets the merged properties of the network with id networkGuid from the sources: User settings, shared settings, user policy, device policy and the currently active settings.

Parameters
string networkGuid

The GUID of the network to get properties for.

function callback

Called with the managed network properties when received.

The callback parameter should be a function that looks like this:

function(object result) {...};
object result
object (optional) Cellular
ManagedBoolean (optional) AutoConnect
object (optional) APN
ManagedDOMString AccessPointName
ManagedDOMString (optional) Language
ManagedDOMString (optional) LocalizedName
ManagedDOMString (optional) Name
ManagedDOMString (optional) Password
ManagedDOMString (optional) Username
object (optional) APNList
array of APNProperties (optional) Active
string (optional) Effective
array of APNProperties (optional) UserPolicy
array of APNProperties (optional) DevicePolicy
array of APNProperties (optional) UserSetting
array of APNProperties (optional) SharedSetting
boolean (optional) UserEditable
boolean (optional) DeviceEditable
string (optional) ActivationType
ActivationStateType (optional) ActivationState
boolean (optional) AllowRoaming
ManagedDOMString (optional) Carrier
string (optional) ESN
string (optional) Family
string (optional) FirmwareRevision
array of FoundNetworkProperties (optional) FoundNetworks
string (optional) HardwareRevision
array of CellularProviderProperties (optional) HomeProvider
string (optional) ICCID
string (optional) IMEI
APNProperties (optional) LastGoodAPN
string (optional) Manufacturer
string (optional) MDN
string (optional) MEID
string (optional) MIN
string (optional) ModelID
string (optional) NetworkTechnology
PaymentPortal (optional) PaymentPortal
integer (optional) PRLVersion
string (optional) RoamingState
CellularProviderProperties (optional) ServingOperator
SIMLockStatus (optional) SIMLockStatus
boolean (optional) SIMPresent
integer (optional) SignalStrength
boolean (optional) SupportNetworkScan
array of string (optional) SupportedCarriers
boolean (optional) Connectable
ConnectionStateType (optional) ConnectionState
string (optional) ErrorState
object (optional) Ethernet
ManagedBoolean (optional) AutoConnect
ManagedDOMString (optional) Authentication
ManagedEAPProperties (optional) EAP
string GUID
ManagedIPConfigType (optional) IPAddressConfigType
array of IPConfigProperties (optional) IPConfigs
string (optional) MacAddress
ManagedDOMString (optional) Name
ManagedIPConfigType (optional) NameServersConfigType
ManagedLong (optional) Priority
object (optional) ProxySettings
object Type
ProxySettingsType (optional) Active
string (optional) Effective
ProxySettingsType (optional) UserPolicy
ProxySettingsType (optional) DevicePolicy
ProxySettingsType (optional) UserSetting
ProxySettingsType (optional) SharedSetting
boolean (optional) UserEditable
boolean (optional) DeviceEditable
object (optional) Manual
ManagedProxyLocation (optional) HTTPProxy
ManagedProxyLocation (optional) SecureHTTPProxy
ManagedProxyLocation (optional) FTPProxy
ManagedProxyLocation (optional) SOCKS
ManagedDOMStringList (optional) ExcludeDomains
ManagedDOMString (optional) PAC
boolean (optional) RestrictedConnectivity
object (optional) StaticIPConfig
ManagedDOMString (optional) Gateway
ManagedDOMString (optional) IPAddress
ManagedDOMStringList (optional) NameServers
ManagedLong (optional) RoutingPrefix
ManagedDOMString (optional) Type
ManagedDOMString (optional) WebProxyAutoDiscoveryUrl
IPConfigProperties (optional) SavedIPConfig
string (optional) Source
TetherProperties (optional) Tether
NetworkType Type
object (optional) VPN
ManagedBoolean (optional) AutoConnect
ManagedDOMString (optional) Host
object (optional) IPsec
ManagedDOMString AuthenticationType
ManagedCertificatePattern (optional) ClientCertPattern
ManagedDOMString (optional) ClientCertRef
ManagedDOMString (optional) ClientCertType
ManagedEAPProperties (optional) EAP
ManagedDOMString (optional) Group
ManagedLong (optional) IKEVersion
ManagedDOMString (optional) PSK
ManagedBoolean (optional) SaveCredentials
ManagedDOMStringList (optional) ServerCARefs
object (optional) XAUTH
ManagedDOMString (optional) Password
ManagedBoolean (optional) SaveCredentials
ManagedDOMString (optional) Username
object (optional) L2TP
ManagedBoolean (optional) LcpEchoDisabled
ManagedDOMString (optional) Password
ManagedBoolean (optional) SaveCredentials
ManagedDOMString (optional) Username
object (optional) OpenVPN
ManagedDOMString (optional) Auth
ManagedDOMString (optional) AuthRetry
ManagedBoolean (optional) AuthNoCache
ManagedDOMString (optional) Cipher
ManagedDOMString (optional) ClientCertRef
ManagedCertificatePattern (optional) ClientCertPattern
ManagedDOMString (optional) ClientCertType
ManagedDOMString (optional) CompLZO
ManagedBoolean (optional) CompNoAdapt
ManagedBoolean (optional) IgnoreDefaultRoute
ManagedDOMString (optional) KeyDirection
ManagedDOMString (optional) NsCertType
ManagedDOMString (optional) OTP
ManagedDOMString (optional) Password
ManagedLong (optional) Port
ManagedDOMString (optional) Proto
ManagedDOMString (optional) PushPeerInfo
ManagedDOMString (optional) RemoteCertEKU
ManagedDOMStringList (optional) RemoteCertKU
ManagedDOMString (optional) RemoteCertTLS
ManagedLong (optional) RenegSec
ManagedBoolean (optional) SaveCredentials
ManagedDOMStringList (optional) ServerCARefs
ManagedDOMString (optional) ServerCertRef
ManagedLong (optional) ServerPollTimeout
ManagedLong (optional) Shaper
ManagedDOMString (optional) StaticChallenge
ManagedDOMString (optional) TLSAuthContents
ManagedDOMString (optional) TLSRemote
ManagedDOMString (optional) UserAuthenticationType
ManagedDOMString (optional) Username
ManagedDOMString (optional) Verb
ManagedDOMString (optional) VerifyHash
object (optional) VerifyX509
ManagedDOMString (optional) Name
ManagedDOMString (optional) Type
object (optional) ThirdPartyVPN
ManagedDOMString ExtensionID
string (optional) ProviderName
ManagedDOMString Type
object (optional) WiFi
ManagedBoolean (optional) AllowGatewayARPPolling
ManagedBoolean (optional) AutoConnect
string (optional) BSSID
ManagedEAPProperties (optional) EAP
integer (optional) Frequency
array of integer (optional) FrequencyList
ManagedDOMString (optional) HexSSID
ManagedBoolean (optional) HiddenSSID
ManagedDOMString (optional) Passphrase
ManagedLong (optional) RoamThreshold
ManagedDOMString (optional) SSID
ManagedDOMString Security
integer (optional) SignalStrength
object (optional) WiMAX
ManagedBoolean (optional) AutoConnect
ManagedEAPProperties (optional) EAP
integer (optional) SignalStrength

getState

chrome.networkingPrivate.getState(string networkGuid, function callback)

Gets the cached read-only properties of the network with id networkGuid. This is meant to be a higher performance function than getProperties, which requires a round trip to query the networking subsystem. The following properties are returned for all networks: GUID, Type, Name, WiFi.Security. Additional properties are provided for visible networks: ConnectionState, ErrorState, WiFi.SignalStrength, Cellular.NetworkTechnology, Cellular.ActivationState, Cellular.RoamingState.

Parameters
string networkGuid

The GUID of the network to get properties for.

function callback

Called immediately with the network state properties.

The callback parameter should be a function that looks like this:

function( NetworkStateProperties result) {...};
NetworkStateProperties result

setProperties

chrome.networkingPrivate.setProperties(string networkGuid, NetworkConfigProperties properties, function callback)

Sets the properties of the network with id networkGuid.

Parameters
string networkGuid

The GUID of the network to set properties for.

NetworkConfigProperties properties

The properties to set.

function (optional) callback

Called when the operation has completed.

If you specify the callback parameter, it should be a function that looks like this:

function() {...};

createNetwork

chrome.networkingPrivate.createNetwork(boolean shared, NetworkConfigProperties properties, function callback)

Since Chrome 31.

Creates a new network configuration from properties. If a matching configured network already exists, this will fail. Otherwise returns the guid of the new network.

Parameters
boolean shared

If true, share this network configuration with other users.

NetworkConfigProperties properties

The properties to configure the new network with.

function (optional) callback

Called with the GUID for the new network configuration once the network has been created.

If you specify the callback parameter, it should be a function that looks like this:

function(string result) {...};
string result

forgetNetwork

chrome.networkingPrivate.forgetNetwork(string networkGuid, function callback)

Since Chrome 43.

Forgets a network configuration by clearing any configured properties for the network with GUID 'networkGuid'. This may also include any other networks with matching identifiers (e.g. WiFi SSID and Security). If no such configuration exists, an error will be set and the operation will fail.

Parameters
string networkGuid

The GUID of the network to forget.

function (optional) callback

Called when the operation has completed.

If you specify the callback parameter, it should be a function that looks like this:

function() {...};

getNetworks

chrome.networkingPrivate.getNetworks(object filter, function callback)

Since Chrome 37.

Returns a list of network objects with the same properties provided by networkingPrivate.getState. A filter is provided to specify the type of networks returned and to limit the number of networks. Networks are ordered by the system based on their priority, with connected or connecting networks listed first.

Parameters
object filter

Describes which networks to return.

NetworkType networkType

The type of networks to return.

boolean (optional) visible

If true, only include visible (physically connected or in-range) networks. Defaults to 'false'.

boolean (optional) configured

If true, only include configured (saved) networks. Defaults to 'false'.

integer (optional) limit

Maximum number of networks to return. Defaults to 1000 if unspecified. Use 0 for no limit.

function callback

Called with a dictionary of networks and their state properties when received.

The callback parameter should be a function that looks like this:

function(array of NetworkStateProperties result) {...};
array of NetworkStateProperties result

getVisibleNetworks

chrome.networkingPrivate.getVisibleNetworks( NetworkType networkType, function callback)

Deprecated since Chrome 37. Use getNetworks.

Deprecated. Please use networkingPrivate.getNetworks with filter.visible = true instead.

Parameters
NetworkType networkType

Since Chrome 37.

function callback

The callback parameter should be a function that looks like this:

function(array of NetworkStateProperties result) {...};
array of NetworkStateProperties result

getEnabledNetworkTypes

chrome.networkingPrivate.getEnabledNetworkTypes(function callback)

Deprecated since Chrome 44. Use getDeviceStates.

Deprecated. Please use networkingPrivate.getDeviceStates instead.

Parameters
function callback

The callback parameter should be a function that looks like this:

function(array of NetworkType result) {...};
array of NetworkType result

getDeviceStates

chrome.networkingPrivate.getDeviceStates(function callback)

Since Chrome 44.

Returns a list of networkingPrivate.DeviceStateProperties objects.

Parameters
function callback

Called with a list of devices and their state.

The callback parameter should be a function that looks like this:

function(array of object result) {...};
array of object result

Properties of each object

boolean (optional) Scanning

Set if the device is enabled. True if the device is currently scanning.

string (optional) SimLockType

Set to the SIM lock type if the device type is Cellular and the device is locked.

boolean (optional) SimPresent

Set to the SIM present state if the device type is Cellular.

enum of "Uninitialized", "Disabled", "Enabling", "Enabled", or "Prohibited" State

The current state of the device.

Uninitialized
Device is available but not initialized.
Disabled
Device is initialized but not enabled.
Enabling
Enabled state has been requested but has not completed.
Enabled
Device is enabled.
Prohibited
Device is prohibited.
NetworkType Type

The network type associated with the device (Cellular, Ethernet, WiFi, or WiMAX).

enableNetworkType

chrome.networkingPrivate.enableNetworkType( NetworkType networkType)

Since Chrome 32.

Enables any devices matching the specified network type. Note, the type might represent multiple network types (e.g. 'Wireless').

Parameters
NetworkType networkType

The type of network to enable.

disableNetworkType

chrome.networkingPrivate.disableNetworkType( NetworkType networkType)

Since Chrome 32.

Disables any devices matching the specified network type. See note for networkingPrivate.enableNetworkType.

Parameters
NetworkType networkType

The type of network to disable.

requestNetworkScan

chrome.networkingPrivate.requestNetworkScan()

Requests that the networking subsystem scan for new networks and update the list returned by getVisibleNetworks. This is only a request: the network subsystem can choose to ignore it. If the list is updated, then the onNetworkListChanged event will be fired.

startConnect

chrome.networkingPrivate.startConnect(string networkGuid, function callback)

Starts a connection to the network with networkGuid.

Parameters
string networkGuid

The GUID of the network to connect to.

function (optional) callback

Called when the connect request has been sent. Note: the connection may not have completed. Observe onNetworksChanged to be notified when a network state changes.

If you specify the callback parameter, it should be a function that looks like this:

function() {...};

startDisconnect

chrome.networkingPrivate.startDisconnect(string networkGuid, function callback)

Starts a disconnect from the network with networkGuid.

Parameters
string networkGuid

The GUID of the network to disconnect from.

function (optional) callback

Called when the disconnect request has been sent. See note for startConnect.

If you specify the callback parameter, it should be a function that looks like this:

function() {...};

startActivate

chrome.networkingPrivate.startActivate(string networkGuid, string carrier, function callback)

Since Chrome 43.

Starts activation of the Cellular network with networkGuid. If called for a network that is already activated, or for a network with a carrier that can not be directly activated, this will show the account details page for the carrier if possible.

Parameters
string networkGuid

The GUID of the Cellular network to activate.

string (optional) carrier

Optional name of carrier to activate.

function (optional) callback

Called when the activation request has been sent. See note for startConnect.

If you specify the callback parameter, it should be a function that looks like this:

function() {...};

getCaptivePortalStatus

chrome.networkingPrivate.getCaptivePortalStatus(string networkGuid, function callback)

Since Chrome 36.

Returns captive portal status for the network matching 'networkGuid'.

Parameters
string networkGuid

Since Chrome 37.

The GUID of the network to get captive portal status for.

function callback

A callback function that returns the results of the query for network captive portal status.

The callback parameter should be a function that looks like this:

function( CaptivePortalStatus result) {...};
CaptivePortalStatus result

unlockCellularSim

chrome.networkingPrivate.unlockCellularSim(string networkGuid, string pin, string puk, function callback)

Since Chrome 46.

Unlocks a Cellular SIM card. * If the SIM is PIN locked, |pin| will be used to unlock the SIM and the |puk| argument will be ignored if provided. * If the SIM is PUK locked, |puk| and |pin| must be provided. If the operation succeeds (|puk| is valid), the PIN will be set to |pin|. (If |pin| is empty or invalid the operation will fail).

Parameters
string networkGuid

The GUID of the cellular network to unlock. If empty, the default cellular device will be used.

string pin

The current SIM PIN, or the new PIN if PUK is provided.

string (optional) puk

The operator provided PUK for unblocking a blocked SIM.

function (optional) callback

Called when the operation has completed.

If you specify the callback parameter, it should be a function that looks like this:

function() {...};

setCellularSimState

chrome.networkingPrivate.setCellularSimState(string networkGuid, object simState, function callback)

Since Chrome 46.

Sets whether or not SIM locking is enabled (i.e a PIN will be required when the device is powered) and changes the PIN if a new PIN is specified. If the new PIN is provided but not valid (e.g. too short) the operation will fail. This will not lock the SIM; that is handled automatically by the device. NOTE: If the SIM is locked, it must first be unlocked with unlockCellularSim() before this can be called (otherwise it will fail and chrome.runtime.lastError will be set to Error.SimLocked).

Parameters
string networkGuid

The GUID of the cellular network to set the SIM state of. If empty, the default cellular device will be used.

object simState

The SIM state to set.

boolean requirePin

Whether or not a PIN should be required.

string currentPin

The current PIN (required for any change, even when the SIM is unlocked).

string (optional) newPin

If provided, change the PIN to |newPin|. |requirePin| must be true.

function (optional) callback

Called when the operation has completed.

If you specify the callback parameter, it should be a function that looks like this:

function() {...};

getGlobalPolicy

chrome.networkingPrivate.getGlobalPolicy(function callback)

Since Chrome 57.

Gets the global policy properties. These properties are not expected to change during a session.

Parameters
function callback

The callback parameter should be a function that looks like this:

function(object result) {...};
object result
boolean (optional) AllowOnlyPolicyNetworksToAutoconnect

If true, only policy networks may auto connect. Defaults to false.

boolean (optional) AllowOnlyPolicyNetworksToConnect

If true, only policy networks may be connected to and no new networks may be added or configured. Defaults to false.

getCertificateLists

chrome.networkingPrivate.getCertificateLists(function callback)

Since Chrome 60. Warning: this is the current Dev channel. Learn more.

Gets the lists of certificates available for network configuration.

Parameters
function callback

The callback parameter should be a function that looks like this:

function(object result) {...};
object result
array of Certificate serverCaCertificates

List of avaliable server CA certificates.

array of Certificate userCertificates

List of available user certificates.

Events

onNetworksChanged

Fired when the properties change on any of the networks. Sends a list of GUIDs for networks whose properties have changed.

addListener

chrome.networkingPrivate.onNetworksChanged.addListener(function callback)
Parameters
function callback

The callback parameter should be a function that looks like this:

function(array of string changes) {...};
array of string changes

onNetworkListChanged

Fired when the list of networks has changed. Sends a complete list of GUIDs for all the current networks.

addListener

chrome.networkingPrivate.onNetworkListChanged.addListener(function callback)
Parameters
function callback

The callback parameter should be a function that looks like this:

function(array of string changes) {...};
array of string changes

onDeviceStateListChanged

Since Chrome 44.

Fired when the list of devices has changed or any device state properties have changed.

addListener

chrome.networkingPrivate.onDeviceStateListChanged.addListener(function callback)
Parameters
function callback

The callback parameter should be a function that looks like this:

function() {...};

onPortalDetectionCompleted

Since Chrome 36.

Fired when a portal detection for a network completes. Sends the guid of the network and the corresponding captive portal status.

addListener

chrome.networkingPrivate.onPortalDetectionCompleted.addListener(function callback)
Parameters
function callback

The callback parameter should be a function that looks like this:

function(string networkGuid, CaptivePortalStatus status) {...};
string networkGuid

Since Chrome 37.

CaptivePortalStatus status

onCertificateListsChanged

Since Chrome 60. Warning: this is the current Dev channel. Learn more.

Fired when any certificate list has changed.

addListener

chrome.networkingPrivate.onCertificateListsChanged.addListener(function callback)
Parameters
function callback

The callback parameter should be a function that looks like this:

function() {...};