Make CookieStore::SetCookieAccessDelegate non-virtual
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:Maksim Orlovich <morlovich@chromium.org> Commit-Queue: Lily Chen <chlily@chromium.org> Cr-Commit-Position: refs/heads/master@{#704242}
Showing
Please register or sign in to comment