Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow the ProtocolHandlerRegistry to operate without a pref storage
The bug 1293295 describes the task to implement the registerProtocolHandler method in the ContentShell. The goal is to be able to define Web Platform Test for the custom handler spec [1]. The current implementation of the ProtocolHandlerRegistry requires the user preference storage to be always enabled, in order to have a persistent storage for the registered handlers. However, this feature is not described in the mentioned spec; it's up to each engine implementation to provide, if needed, its own persistent storage approach. It makes sense that for testing purposes the registry could operate without any persistent storage at all and just use the data structures in memory to verify the tests results. This CL changes the preferences related logic in the registry to consider the possibility of a null PrefService instance. [1] https://html.spec.whatwg.org/multipage/system-state.html#custom-handlers Bug: 1293295 Change-Id: I00e5b0056b6abd3417d1d11aaa9cc83951b826e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3541005 Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Dominic Battré <battre@chromium.org> Reviewed-by: Dominick Ng <dominickn@chromium.org> Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Cr-Commit-Position: refs/heads/main@{#984740}
- Loading branch information
1 parent
5c6af8e
commit e7db8a1
Showing
9 changed files
with
39 additions
and
26 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
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