requestPin ext API: No quotas for first requests
Don't apply the quota (how many times the API can be called by an extension during 1 minute / 10 minutes) to the chrome.certificateProvider.requestPin API when it's called for the first time with the new maximum request ID. This should, in particular, resolve the UX issues in the Chrome OS smart card login feature, where the user may quickly trigger a significant number of PIN requests by clicking on user pods and declining the PIN requests. To simplify the implementation, we're relaxing the quota under the assumption that the requestId are monotonically increasing (which is guaranteed by Chrome) and that the caller extension doesn't call reorder them (which is not guaranteed by an extension, but that's how they are typically expected to work). Nothing bad, however, would happen if these assumptions will be violated in some cases - the quota will only become slightly stricter (as it was before this CL). Bug: 989641 Test: repeat 20 times an attempt to log into Chrome OS via a smart card, check that the PIN request is shown each time, and abort it Change-Id: I189d5e97d51f1f4262869c17e532e0571f74f0f5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1845009Reviewed-by:Igor <igorcov@chromium.org> Commit-Queue: Maksim Ivanov <emaxx@chromium.org> Cr-Commit-Position: refs/heads/master@{#704197}
Showing
Please register or sign in to comment