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

Unified Diff: third_party/closure_compiler/externs/quick_unlock_private.js

Issue 2376293005: cros: Tweaked the good/bad pin checking on the js to use the new quick unlock api function. (Closed)
Patch Set: Fixed patch set 9 errors. Created 4 years 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
Index: third_party/closure_compiler/externs/quick_unlock_private.js
diff --git a/third_party/closure_compiler/externs/quick_unlock_private.js b/third_party/closure_compiler/externs/quick_unlock_private.js
index aa6f6d2b2fe4914bf263507bfa1a0beab2a6d1ea..2b97520a8fd576ae1b4f75e7abd0f4994cfd0f7f 100644
--- a/third_party/closure_compiler/externs/quick_unlock_private.js
+++ b/third_party/closure_compiler/externs/quick_unlock_private.js
@@ -25,6 +25,35 @@ chrome.quickUnlockPrivate.QuickUnlockMode = {
};
/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/quickUnlockPrivate#type-CredentialProblem
+ */
+chrome.quickUnlockPrivate.CredentialProblem = {
+ TOO_SHORT: 'TOO_SHORT',
+ TOO_LONG: 'TOO_LONG',
+ TOO_WEAK: 'TOO_WEAK',
+ CONTAINS_NONDIGIT: 'CONTAINS_NONDIGIT',
+};
+
+/**
+ * @typedef {{
+ * errors: !Array<!chrome.quickUnlockPrivate.CredentialProblem>,
+ * warnings: !Array<!chrome.quickUnlockPrivate.CredentialProblem>
+ * }}
+ * @see https://developer.chrome.com/extensions/quickUnlockPrivate#type-CredentialCheck
+ */
+chrome.quickUnlockPrivate.CredentialCheck;
+
+/**
+ * @typedef {{
+ * minLength: number,
+ * maxLength: number
+ * }}
+ * @see https://developer.chrome.com/extensions/quickUnlockPrivate#type-CredentialRequirements
+ */
+chrome.quickUnlockPrivate.CredentialRequirements;
+
+/**
* Returns the set of quick unlock modes that are available for the user to use.
* Some quick unlock modes may be disabled by policy.
* @param {function(!Array<!chrome.quickUnlockPrivate.QuickUnlockMode>):void}
@@ -43,6 +72,30 @@ chrome.quickUnlockPrivate.getAvailableModes = function(onComplete) {};
chrome.quickUnlockPrivate.getActiveModes = function(onComplete) {};
/**
+ * Checks if the given credential can be used for the given unlock mode.
+ * Enterprise policy can change credential requirements.
+ * @param {!chrome.quickUnlockPrivate.QuickUnlockMode} mode The quick unlock
+ * mode that is used.
+ * @param {string} credential The given credential.
+ * @param {function(!chrome.quickUnlockPrivate.CredentialCheck):void} onComplete
+ * Called with a list of warnings and errors the given |credential| has
+ * (or an empty list if there are none).
+ * @see https://developer.chrome.com/extensions/quickUnlockPrivate#method-checkCredential
+ */
+chrome.quickUnlockPrivate.checkCredential = function(mode, credential, onComplete) {};
+
+/**
+ * Gets the credential requirements for the given unlock mode.
+ * @param {!chrome.quickUnlockPrivate.QuickUnlockMode} mode The quick unlock
+ * mode that is used.
+ * @param {function(!chrome.quickUnlockPrivate.CredentialRequirements):void}
+ * onComplete Called with the credential requirements of the given
+ * |mode|.
+ * @see https://developer.chrome.com/extensions/quickUnlockPrivate#method-getCredentialRequirements
+ */
+chrome.quickUnlockPrivate.getCredentialRequirements = function(mode, onComplete) {};
+
+/**
* Update the set of quick unlock modes that are currently active/enabled.
* @param {string} accountPassword The password associated with the account
* (e.g. the GAIA password). This is required to change the quick unlock

Powered by Google App Engine
This is Rietveld 408576698