feat: make Chrome extensions work on custom protocols#49951
Conversation
346d31f to
cbd6983
Compare
| - if (scheme == kValidSchemes[i] && (valid_schemes_ & kValidSchemeMasks[i])) { | ||
| - return true; | ||
| + if (scheme == kValidSchemes[i]) { | ||
| + return valid_schemes_ & kValidSchemeMasks[i]; |
There was a problem hiding this comment.
These lines have been upstreamed in https://crrev.com/c/7639311.
cbd6983 to
3741b3b
Compare
jkleinsc
left a comment
There was a problem hiding this comment.
The documentation needs to be updated to reflect this item:
"Once enabled, the feature cannot be disabled again until the app is restarted (due to how Chromium's code is written)."
I'm surprised there isn't a way to make this dynamic, though I suppose most people would either want it on or off.
|
@jkleinsc Thanks for the review! Documentation line added. |
8ce4a25 to
1c2c562
Compare
|
Release Notes Persisted
|
|
I was unable to backport this PR to "40-x-y" cleanly; |
|
I have automatically backported this PR to "41-x-y", please check out #50529 |
|
I have automatically backported this PR to "42-x-y", please check out #50530 |
|
🎉 |
|
Sorry to be comment spam but a simple thumbs up does not adequately convey my appreciation for this PR. Thank you to all involved! |
Thanks! Appreciate the kind words. :) |
Description of Change
Fixes #26812
Adds an
allowExtensionsprivilege toprotocol.registerSchemesAsPrivileged()to enable Chrome extensions on custom protocols.Implementation details:
electron_api_web_request.ccalso usesURLPattern. I have spent a lot of time on verifying that those usages still work as expected. I've also added tests to ensure they will continue to work going forward.Checklist
npm testpassesRelease Notes
Notes: Added
allowExtensionsprivilege toprotocol.registerSchemesAsPrivileged()to enable Chrome extensions on custom protocols.