• Sky Malice's avatar
    [Feed] Implement GetCurrentArticleSuggestions() · 0a420dd8
    Sky Malice authored
    The Feed provides information about articles that the offline host must
    pass along to Prefetch. However this is instigated by Prefetch from
    native and is async, which causes some problems. In order to convert a
    list of objects across the JNI, state is held in the FeedOfflineBridge
    inside a vector. In order to strongly own the callback to Prefetch, it
    is stored in the FeedOfflineHost, which guarantees Prefetch is still
    alive. While at it we added a vector of pending callbacks for known
    content which may be used one day by internals page for Feed.
    
    This code is not actually invoked yet the FeedOfflineHost does
    not yet provide itself to Prefetch.
    
    Bug: 866123
    Change-Id: Ie4cf9597d9fcaa47baadff060001974fa1375e6b
    Reviewed-on: https://chromium-review.googlesource.com/1219937
    Commit-Queue: Sky Malice <skym@chromium.org>
    Reviewed-by: default avatarFilip Gorski <fgorski@chromium.org>
    Reviewed-by: default avatarGang Wu <gangwu@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#591222}
    0a420dd8
content_metadata.cc 485 Bytes