Chromium Code Reviews| 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..13dbc4194d39f018206c195c8ae58d39160fc828 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 CredentialProblem { |
| + TOO_SHORT, |
| + TOO_LONG, |
| + TOO_WEAK, |
| + CONTAINS_NONDIGIT |
| + }; |
| + |
| + dictionary CredentialCheck { |
| + CredentialProblem[] errors; |
| + CredentialProblem[] warnings; |
| + long? minLength; |
|
jdufault
2016/11/01 18:56:44
API implementation is currently always providing a
sammiequon
2016/11/02 18:05:25
0 stands for infinite, so this should non-nullable
|
| + long? maxLength; |
| + }; |
| + |
| callback BooleanResultCallback = void (boolean value); |
| callback ModesCallback = void (QuickUnlockMode[] modes); |
| + callback CredentialCheckCallback = void (CredentialCheck check); |
| interface Functions { |
| // Returns the set of quick unlock modes that are available for the user to |
| @@ -31,6 +46,12 @@ 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. |
| + static void checkCredential(QuickUnlockMode mode, |
| + DOMString credential, |
| + CredentialCheckCallback 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. |