• Alex Newcomer's avatar
    [multipaste]One CH entry for files app · 9fd61633
    Alex Newcomer authored
    Files app copies raw images onto the clipboard by:
    1. In JS, save files app metadata.
    2. Later, on the chrome side, add raw image data by:
      - Reading step 1's data from Clipboard.
      - Add raw image data.
      - Write to clipboard a second time.
    
    In a way, files app uses the clipboard as a temp variable.
    
    This results in two entries to ClipboardHistory.
    Delete the old one, then allow the second Write to create
    a new entry in history.
    
    Bug: 1150155
    Change-Id: I90649d9b56ebfc538ab962e4c769a869b9d5d082
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2630405Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Commit-Queue: Alex Newcomer <newcomer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#844272}
    9fd61633
clipboard_util.cc 5.74 KB