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..7ab7932e742d9311453e73c1075328f66723c768 100644 |
--- a/chrome/common/extensions/api/quick_unlock_private.idl |
+++ b/chrome/common/extensions/api/quick_unlock_private.idl |
@@ -19,8 +19,22 @@ namespace quickUnlockPrivate { |
PIN |
}; |
+ enum CredentialRequirementFailure { |
+ TOO_SHORT, |
+ TOO_LONG, |
+ TOO_WEAK |
+ }; |
+ |
+ dictionary CredentialRequirement { |
+ CredentialRequirementFailure[] failures; |
+ long? minLength; |
+ long? maxLength; |
+ }; |
+ |
callback BooleanResultCallback = void (boolean value); |
callback ModesCallback = void (QuickUnlockMode[] modes); |
+ callback CredentialRequirementCallback = |
+ void (CredentialRequirement requirement); |
interface Functions { |
// Returns the set of quick unlock modes that are available for the user to |
@@ -31,6 +45,12 @@ namespace quickUnlockPrivate { |
// the lock screen. |
static void getActiveModes(ModesCallback onComplete); |
+ // Returns whether the pin can be used or if there is issue with the choice |
+ // of pin. |
+ static void isCredentialUsable(QuickUnlockMode mode, |
+ DOMString attemptedPassword, |
jdufault
2016/09/30 01:05:51
attemptedPassword => credential
sammiequon
2016/09/30 18:38:36
Done.
|
+ CredentialRequirementCallback onComplete); |
+ |
// 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. |