• Mikel Astiz's avatar
    Fix partner bookmarks root using wrong GUID · ab2d9495
    Mikel Astiz authored
    Partner bookmarks live outside BookmarkModel and are exposed to Java via
    dedicated JNI APIs. The root is instantiated by PartnerBookmarksReader
    and owned by PartnerBookmarksShim.
    
    Prior to this patch, the construction of the root in
    PartnerBookmarksReader was using BookmarkPermanentNode's constructor
    with type FOLDER, which (currently) gets interpreted as managed
    bookmarks (controlled by enterprise policies).
    
    This leads to the wrong bookmark GUID being used (the one for managed
    bookmarks' root) but is otherwise harmless, because the GUID is actually
    never read.
    
    The patch fixes this by avoiding the construction of a
    BookmarkPermanentNode and instead constructing a regular BookmarkNode to
    be used as partner bookmarks root, using a randomly-generated GUI.
    
    Change-Id: I2234051b2a4f00b77a0d0b9391eb16f5107ee97c
    Bug: 1060311
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2141973
    Commit-Queue: Mikel Astiz <mastiz@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#757891}
    ab2d9495
partner_bookmarks_reader.h 4.78 KB