commit | ecaff4ddd80cde0e9663a65f58989714c9d070e5 | [log] [tgz] |
---|---|---|
author | Sebastien Lalancette <seblalancette@chromium.org> | Mon Dec 17 22:38:06 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Dec 17 22:38:06 2018 |
tree | 500f7d7d7aabb57514f4ccfc1be6f9ff9ab862c9 | |
parent | e5a1aaf79834f703a375eb26528e96ee8e250156 [diff] |
Pulled-up AutocompleteHistoryManager to be a KeyedService. Autocomplete suggestions are scoped under a Profile, but the AutocompleteHistoryManager was living under a Frame context. Pulling it up to live at the BrowserContext level makes it represent the reality better. It will also allow us to run "one-time" initialization, such as logging metrics for local data once on start-up. To keep in mind: - Since we don't want to load all autocomplete entries into memory, autocomplete suggestions are always fetched asynchronously. Before: - AutocompleteHistoryManager lived in AutofillManager, - AutofillManager gave an instance of ExternalDelegate to AutocompleteHistoryManager, - Whenever AutocompleteHistoryManager asynchronously received suggestions, it forwarded them to the given ExternalDelegate. - All three instances are within the context of a Frame. After: - AutocompleteHistoryManager lives as a KeyedService, and is passed as a ctor parameter to AutofillManager. - AutofillManager implements the AutocompleteHistoryManager::SuggestionsHandler interface. - Whenever an AutofillManager instance wants to fetch autocomplete suggestions, it passes itself as an observer of the query. - AutocompleteHistoryManager keeps a map of DB query IDs (unique) to observers, and updates them upon receiving the suggestions. - When AutofillManager is invoked after receiving the suggestions, it forwards them to its ExternalDelegate instance, allowing per Frame rendering. Bug: 915223 Bug: 907902 Change-Id: I9e3d257269e4918a6ce29bcbbb2ec961afccaab1 Reviewed-on: https://chromium-review.googlesource.com/c/1351434 Commit-Queue: Sebastien Lalancette <seblalancette@chromium.org> Reviewed-by: Tao Bai <michaelbai@chromium.org> Reviewed-by: Olivier Robin <olivierrobin@chromium.org> Reviewed-by: Moe Ahmadi <mahmadi@chromium.org> Reviewed-by: Fabio Tirelo <ftirelo@chromium.org> Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org> Reviewed-by: Vadym Doroshenko <dvadym@chromium.org> Cr-Commit-Position: refs/heads/master@{#617267}
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.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .