The clipboard history menu model adapter supplies menu item views with a
snapshot of the item from when the item was first created. In order to
account for updates such as HTML preview rendering--while also ensuring
there is no UAF potential when items are removed from the menu--this CL
caches the item ID and a handle to the clipboard history item model in
every view.
Bug: b/267677307
Change-Id: I7730e493e1e2e87c5cc1e0c4575b4ca91ad51d30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4262924
Reviewed-by: David Black <dmblack@google.com>
Commit-Queue: Colin Kincaid <ckincaid@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1107808}