• Robert Ogden's avatar
    Ignore deleted Offline page events · 676e4ce9
    Robert Ogden authored
    The OfflinePageModel likes to call OfflinePageDeleted when entries are
    refreshed or otherwise cleaned up. When this happens it comes with an
    OfflinePageAdded event (before the deletion) with a different offline
    page id but the same url. Thus, the offline helper entry is removed
    whenever that happens because we are not keying on offline page id.
    
    This CL makes it so we may trigger a preview attempt on a truly
    deleted page, but only for a single session. This comes at the benefit
    of triggering on all true positives.
    
    Bug: 969163
    Change-Id: I4cf9d303ae997f1acba46652a48112bf6d3afabd
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1715529Reviewed-by: default avatarRyan Sturm <ryansturm@chromium.org>
    Commit-Queue: Robert Ogden <robertogden@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#680163}
    676e4ce9
previews_offline_helper.cc 9.67 KB