[Autofill Assistant] Tweak AutofillAction UI.
Before this patch, AutofillAction would behave as follows: - when there are no cards or profile registered for autofill, the action would hang forever, as AutofillAssistantUiDelegate.showProfiles and showCards would return immediately without reporting any results. - when a card or profile was selected, the button would remain, but clicking on it would crash the application (as it would call a C++ callback that was already deleted). This patch attempts to guarantee that the callbacks that correspond to AutofillAssistantUiDelegate.Client::onAddressSelected and onCardSelected are called exactly once. With this patch: - when there are no cards, the callback is called with an empty guid which tells the action to fall back to manuall filling - buttons disappear once they're clicked. If that fails, the C++ layer ignores duplicate calls for the same callback, without crashing. Bug: 806868 Change-Id: I15bb1b1e6ee528c18cbd76763827e69dfe3f1726 Reviewed-on: https://chromium-review.googlesource.com/c/1264475Reviewed-by:Rouslan Solomakhin <rouslan@chromium.org> Commit-Queue: Stephane Zermatten <szermatt@chromium.org> Cr-Commit-Position: refs/heads/master@{#597105}
Showing
Please register or sign in to comment