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

Unified Diff: chrome/common/extensions/api/quick_unlock_private.idl

Issue 2374303002: cros: Added a new function to quick unlock api for checking unfinished pins. (Closed)
Patch Set: Fixed patch set 22 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: chrome/common/extensions/api/quick_unlock_private.idl
diff --git a/chrome/common/extensions/api/quick_unlock_private.idl b/chrome/common/extensions/api/quick_unlock_private.idl
index c3121beffcaf4e61c5d7148737a66a8e72b6f317..2f4a3af3d46153fe34eb9ca545815fe1b1d972ab 100644
--- a/chrome/common/extensions/api/quick_unlock_private.idl
+++ b/chrome/common/extensions/api/quick_unlock_private.idl
@@ -19,8 +19,35 @@ namespace quickUnlockPrivate {
PIN
};
+ // The problems a given PIN might have.
+ enum CredentialProblem {
+ TOO_SHORT,
+ TOO_LONG,
+ TOO_WEAK,
+ CONTAINS_NONDIGIT
+ };
+
+ dictionary CredentialCheck {
+ // The given PINs errors. Users cannot proceed with an error.
+ CredentialProblem[] errors;
+ // THe given PINs warnings. Users can, but are not advised to proceed with
+ // a warning.
+ CredentialProblem[] warnings;
+ };
+
+ dictionary CredentialRequirements {
+ // The minimum allowed length for a PIN.
+ long minLength;
+ // The maximum allowed length for a PIN. A value of 0 indicates no maximum
+ // length.
+ long maxLength;
+ };
+
callback BooleanResultCallback = void (boolean value);
callback ModesCallback = void (QuickUnlockMode[] modes);
+ callback CredentialCheckCallback = void (CredentialCheck check);
+ callback CredentialRequirementsCallback =
+ void (CredentialRequirements requirements);
stevenjb 2016/12/01 17:32:13 indent 4 spaces from start of previous line
sammiequon 2016/12/01 18:31:30 Done.
interface Functions {
// Returns the set of quick unlock modes that are available for the user to
@@ -31,6 +58,22 @@ namespace quickUnlockPrivate {
// the lock screen.
static void getActiveModes(ModesCallback onComplete);
+ // Checks if the given credential can be used for the given unlock mode.
+ // Enterprise policy can change credential requirements.
+ // |mode|: The quick unlock mode that is used.
+ // |credential|: The given credential.
+ // |onComplete|: Called with a list of warnings and errors the given
+ // |credential| has (if any).
stevenjb 2016/12/01 17:32:13 Indent comment 4 spaces (this looks like |credenti
sammiequon 2016/12/01 18:31:30 Done.
+ static void checkCredential(QuickUnlockMode mode,
+ DOMString credential,
+ CredentialCheckCallback onComplete);
+
+ // Gets the credential requirements for the given unlock mode.
+ // |mode|: The quick unlock mode that is used.
+ // |onComplete|: Called with the credential requirements of the given |mode|.
stevenjb 2016/12/01 17:32:13 Line too long
sammiequon 2016/12/01 18:31:30 Done.
+ static void getCredentialRequirements(
+ QuickUnlockMode mode, CredentialRequirementsCallback onComplete);
stevenjb 2016/12/01 17:32:13 indent
sammiequon 2016/12/01 18:31:30 Done.
+
// Update the set of quick unlock modes that are currently active/enabled.
// |accountPassword|: The password associated with the account (e.g. the
// GAIA password). This is required to change the quick unlock credentials.

Powered by Google App Engine
This is Rietveld 408576698