[bfcache] Report other reasons along with CacheControlNoStore This CL fixes a bug where CacheControlNoStore related feature is not reported with other reasons. This bug was caused because of two reasons: 1) Upon other eviction when a page is in bfcache, not recording CacheControlNoStore reasons. 2) Upon other eviction OnPageLifecycleChangedAck, not recording CacheControlNoStore reasons. This CL fixes both of them in MaybeEvictFromBackForwardCache() and EvictFromBackForwardCacheWithReason(). (These two functions both call EvictFromBackForwardCacheWithReasons(), and at this point the reasons cannot change.) Note that we have to make a special case for OnPageLifecycleChangedAck. Upon getting an ack from renderer to enter bfcache, we do not want to evict the entry if the only reason evicting is CacheControlNoStore. We want the pages to enter bfcache instead. But when there are other reasons at that point, we want to evict with them, as well as CacheControlNoStore. Design doc: https://docs.google.com/document/d/1RSJqWqxd3tZUESPQTNt7CdVaW-hbUQOK3ojfpeoG8-o/edit# Bug: 1240064 Change-Id: I3206db5cbd2bb55fd8a4f196396970fdcc88c04e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3096892 Commit-Queue: Yuzu Saijo <yuzus@chromium.org> Reviewed-by: Alexander Timin <altimin@chromium.org> Reviewed-by: Fergal Daly <fergal@chromium.org> Cr-Commit-Position: refs/heads/main@{#919863}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.