| Index: ui/webui/resources/cr_elements/network/cr_onc_types.js
|
| diff --git a/ui/webui/resources/cr_elements/network/cr_onc_types.js b/ui/webui/resources/cr_elements/network/cr_onc_types.js
|
| index a541b66bedd60ea4488442743b5940725387ded6..82cf2703a732c91d32bdbc54bac43d5bb6d4c2f4 100644
|
| --- a/ui/webui/resources/cr_elements/network/cr_onc_types.js
|
| +++ b/ui/webui/resources/cr_elements/network/cr_onc_types.js
|
| @@ -122,6 +122,14 @@ CrOnc.IPType = {
|
| };
|
|
|
| /** @enum {string} */
|
| +CrOnc.EAPType = {
|
| + LEAP: 'LEAP',
|
| + PEAP: 'PEAP',
|
| + EAP_TLS: 'EAP-TLS',
|
| + EAP_TTLS: 'EAP-TTLS',
|
| +};
|
| +
|
| +/** @enum {string} */
|
| CrOnc.LockType = {
|
| NONE: '',
|
| PIN: 'sim-pin',
|
| @@ -571,4 +579,15 @@ CrOnc.shouldShowTetherDialogBeforeConnection = function(networkProperties) {
|
| // and they indicate that a connection has not yet occurred to this host.
|
| return !networkProperties.Tether ||
|
| !networkProperties.Tether.HasConnectedToHost;
|
| -}
|
| +};
|
| +
|
| +/**
|
| + * Returns a valid CrOnc.Type, or undefined.
|
| + * @param {string} typeStr
|
| + * @return {!CrOnc.Type|undefined}
|
| + */
|
| +CrOnc.getValidType = function(typeStr) {
|
| + if (Object.values(CrOnc.Type).indexOf(typeStr) >= 0)
|
| + return /** @type {!CrOnc.Type} */ (typeStr);
|
| + return undefined;
|
| +};
|
|
|