commit | 796f67fa7d09e782403b125d4af039180a207bdd | [log] [tgz] |
---|---|---|
author | Hiroki Nakagawa <nhiroki@chromium.org> | Wed Jul 17 10:56:36 2024 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jul 17 10:56:36 2024 |
tree | 6deff24b71d17059aad6ae7c6b7b8150a2979dcc | |
parent | 0c79e4f5e4257fcc9a7011e45365490a6be58d1c [diff] |
SearchPrefetch: Adjust the size of cache entries depending on "cache_size" SearchPrefetchService manages a map from search URL to prefetch URL, so that subsequent search requests could load prefetched responses from the disk cache (not from the in-memory cache). This map is stored in the prefs. The size of the map is capped by the "cache_size" field trial parameter. Before this CL, the map size was checked only when a new entry was added, and the map never shrunk even if the "cache_size" is lowered through the field trial parameter (Exception: the cache is cleared when a user requests to clear browsing data or the template URL service is changed). To fix it, this CL checks the "cache_size" when the map is loaded from the prefs, and discards extra entries if needed. This change is necessary for experimenting on various "cache_size". Bug: 353628436 Change-Id: I2ce464897e12e8a2bd4a03648e162cafc4e8a244 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5715896 Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Lingqi Chi <lingqi@chromium.org> Cr-Commit-Position: refs/heads/main@{#1328753}
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.