
Many consumers of ExtensionPrefs check if a given reason is the only disable reason for an extension. They currently do so by getting the disable reason set, checking its size is 1 and reading the set content. This change adds a new HasOnlyDisableReason method which can be used for this purpose. All callers have been updated to use this method, making them cleaner. Bug: 372186532 Change-Id: Ic602e920090fe02ca17c9c8302cef84c8ee50a32 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6267643 Commit-Queue: Sohail Rajdev <sorajdev@microsoft.com> Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org> Reviewed-by: Paul Adedeji <pauladedeji@google.com> Reviewed-by: Ankush Singh <ankushkush@google.com> Cr-Commit-Position: refs/heads/main@{#1420966}
This will become a reusable extensions module. It implements the core parts of Chrome's extension system, and can be used with any host of the content module.
Some extensions code that is not Chrome-specific still lives in //chrome/browser/extensions and will be moved here.
Technical Documentation: