[omnibox] Persist to pref when a user manually shows a suggestion group
Currently, we persist to a pref when a user manually hides a suggestion group. This works because all suggestion groups are default-shown. In the near future, we plan to have some suggestion groups be default-hidden. So now, we should persist if a user has manually shown a suggestion group as well. (See go/desktop-chrome-polaris-engdesign for details.) This CL obsoletes the "omnibox.hiddenGroupIds" list pref and instead creates a new "omnibox.suggestionGroupVisibility" dictionary pref, which has the group ID as the key, and stores two possible states: - HIDDEN (1) - SHOWN (2) If the user has never set the preference, we plan to eventually return a third value: - DEFAULT (0) In that case, the callsite will have to decide on the proper default visibility, which will be either a client-side flag or a server-provided hint per-group. One more thing: I've purposely not provided a migration path from the old pref to the new pref. I did this for simplicity sake. I've looked at the UMA, and there are only ~25 count usages of the collapse / expand feature each on Stable in the last 30 days. Across all Channels, there's ~550 each over the last 30 days. I think a significant fraction of that 550 is Chromium developers. In other words, I think simplicity trumps migrating the prefs of the scant few users who've set this pref so far. Bug: 1106096 Change-Id: I8f0bf559f897474c18b9bf90cc33cb8b040cb0fa Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2303862 Commit-Queue: Tommy Li <tommycli@chromium.org> Reviewed-by:Justin Donnelly <jdonnelly@chromium.org> Reviewed-by:
Moe Ahmadi <mahmadi@chromium.org> Cr-Commit-Position: refs/heads/master@{#790554}
Showing
Please register or sign in to comment