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..ed92efb292d46de63479b9f236595a0e3b2a46d0 100644 |
--- a/chrome/common/extensions/api/quick_unlock_private.idl |
+++ b/chrome/common/extensions/api/quick_unlock_private.idl |
@@ -19,8 +19,24 @@ namespace quickUnlockPrivate { |
PIN |
}; |
+ enum CredentialProblem { |
Devlin
2016/11/23 18:22:49
comment
sammiequon
2016/11/29 19:22:44
Done.
|
+ TOO_SHORT, |
+ TOO_LONG, |
+ TOO_WEAK, |
+ CONTAINS_NONDIGIT |
+ }; |
+ |
+ dictionary CredentialCheck { |
+ CredentialProblem[] errors; |
Devlin
2016/11/23 18:22:49
Ideally, we should have comments over each of thes
sammiequon
2016/11/29 19:22:45
Done.
|
+ CredentialProblem[] warnings; |
+ long minLength; |
+ // If |maxLength| is 0, there is no PIN max length. |
Devlin
2016/11/23 18:22:49
Prefer something like:
// The maximum allowed leng
sammiequon
2016/11/29 19:22:44
Done.
|
+ 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 +47,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. |
Devlin
2016/11/23 18:22:49
Document each param that goes in (similar to setMo
sammiequon
2016/11/29 19:22:45
Done.
|
+ 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. |