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..9964b031efab91049d4cc4e13d0684b6ab4c5e42 100644 |
--- a/chrome/common/extensions/api/quick_unlock_private.idl |
+++ b/chrome/common/extensions/api/quick_unlock_private.idl |
@@ -19,8 +19,23 @@ namespace quickUnlockPrivate { |
PIN |
}; |
+ enum CredentialRequirementFailure { |
+ TOO_SHORT, |
+ TOO_LONG, |
+ TOO_WEAK |
+ }; |
+ |
+ dictionary CredentialRequirement { |
+ CredentialRequirementFailure[] failures; |
+ long? minLength; |
+ long? maxLength; |
+ boolean? allowEasyPins; |
jdufault
2016/10/04 22:57:28
Why does the UI need to know the policy value for
sammiequon
2016/10/05 19:48:11
I thought they will display a warning instead of e
jdufault
2016/10/05 21:47:37
This means that some of the failures are not actua
sammiequon
2016/10/14 20:58:53
Done.
|
+ }; |
+ |
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 +46,11 @@ namespace quickUnlockPrivate { |
// the lock screen. |
static void getActiveModes(ModesCallback onComplete); |
+ // Returns a set of problems if any with the give mode and credential. |
jdufault
2016/10/04 22:57:28
What about:
// Checks if the given credential can
sammiequon
2016/10/05 19:48:11
Done.
|
+ static void isCredentialUsable(QuickUnlockMode mode, |
+ DOMString credential, |
+ 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. |