[Autofill Assistant] Remove the profile cache data observers.
Before this patch, we kept adding new observers to the list of cache data observers when closing the app (without the app being destroyed). Resuming the activity by triggering another run would reuse the existing profile cache and the default profile image was shown. This patch introduces a destroy() function to the header coordinator so that it can clean up internals when we go out of scope. In particular it removes the profile data observer registered in the constructor. Bug: b/132379462 Change-Id: I96c473b6748bd8b7105cab58bfdb497411e6f93c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1609779 Commit-Queue: Mathias Carlen <mcarlen@chromium.org> Reviewed-by:Clemens Arbesser <arbesser@google.com> Cr-Commit-Position: refs/heads/master@{#661323}
Showing
Please register or sign in to comment