-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move ownership of AutocompleteController to Java.
This change swaps the ownership model of the AutocompleteController, enabling Java to own the C++ class. Moving forward, all instances of AutocompleteControllers are created and managed by the AutocompleteControllerProvider class, which warrants that instances can be shared (where necessary) within, but not across, windows. As a result, the AutocompleteController clients are decoupled, permitting multiple Omniboxes across multiple Windows to operate independently, while correctly reporting metrics. AutocompleteControllerProvider lifecycle is bound directly to WindowAndroid, and each created instance of the AutocompleteController is bound to a pair: (WindowAndroid, Profile). When Window gets closed the AutocompleteControllerProvider warrants proper cleanup of all of the assoiciated AutocompleteControllers. For exceptional cases, where Autocomplete subsystem is needed ahead of any windows being open, a dedicated static method is introduced, that warrants proper setup and teardown of the ephemeral instance of an AutocompleteController. ShortcutsProvider: This change makes ShortcutsProvider keep the scoped reference to the ShortcutsBackend it talks to. This backend is guaranteed to be the correct one, because each AutocompleteProviderClient (passed only once upon instantiation and retained by all Providers) is associated with only one Profile. This change solves a clean-up problem, where upon Profile being destroyed, ShortcutsProvider attempts to retrieve its related Backend and fails, because the Key (Profile) is no longer valid. Discussion: go/decoupling-autocomplete-controllers-proposal Change-Id: I2130d4158f0508bdff7b836ccd067fd426830503 Fixed: 1295054 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4199060 Commit-Queue: Tomasz Wiszkowski <ender@google.com> Reviewed-by: Ted Choc <tedchoc@chromium.org> Cr-Commit-Position: refs/heads/main@{#1100670}
- Loading branch information
1 parent
4640177
commit 3b2eff7
Showing
26 changed files
with
621 additions
and
342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.