• Aran Gilman's avatar
    Store the most recent DistillabilityResult for each web contents. · 8f6ba6cd
    Aran Gilman authored
    The main consumer of DistillabilityResult on desktop, the Reader Mode
    icon, updates whenever the user switches tabs. However, the
    distillability service usually will not run again when the tabs are
    switched, so the icon will not update if it sees the web contents'
    distillability only when OnResult() is called. It needs to be retrieve
    the distillability of a given web contents in between calls to
    OnResult(), as well as keep track of which web contents the result
    belonged to.
    
    The simplest solution is to store the result in DistillabilityDriver,
    since it is already correctly scoped to a single web contents.
    
    Bug: 952042
    Change-Id: I8a8633a52583f04b49298ee5186b24a5eb092fdf
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1788498Reviewed-by: default avatarWei-Yin Chen (陳威尹) <wychen@chromium.org>
    Commit-Queue: Aran Gilman <gilmanmh@google.com>
    Cr-Commit-Position: refs/heads/master@{#697724}
    8f6ba6cd
distillable_page_utils.cc 2.97 KB