• Lily Chen's avatar
    Make CookieStore::SetCookieAccessDelegate non-virtual · b7e890da
    Lily Chen authored
    Previously this method was virtual, and the default implementation just
    did nothing. However this would cause the unique_ptr argument to just
    be destroyed, and that was causing segfaults in tests which tried to
    hold onto the pointer to the delegate (and use it to set expected
    values, etc.), if the CookieStore they were using had the default
    implementation.
    
    This change moves the implementation of SetCookieAccessDelegate from
    CookieMonster to its base class CookieStore, and stores the delegate
    in the base class itself, to avoid this problem.
    
    Bug: 978172
    Change-Id: Iee2c2ee7a5edae9e98266a7c4d38774f5babb3ab
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1849114Reviewed-by: default avatarMaksim Orlovich <morlovich@chromium.org>
    Commit-Queue: Lily Chen <chlily@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#704242}
    b7e890da
cookie_monster.h 30.4 KB