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

Unified Diff: ui/webui/resources/cr_elements/network/cr_onc_types.js

Issue 2848683003: MD Settings: Add settings-internet-config (WiFi only, no certs) (Closed)
Patch Set: Rebase + add histogram enum Created 3 years, 7 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 | « tools/metrics/histograms/enums.xml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+};
« no previous file with comments | « tools/metrics/histograms/enums.xml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698