Re: Better build-time predefined protocol handlers

Skip to first unread message

Javier Fernandez

Sep 27, 2021, 5:33:09 PM9/27/21


I've started to implement the design we discussed back in June and I
landed a few patches already. The Protocol Handler class has been moving
to //content already (see the CL [1] for details) but we've found some
obstacles with the refactoring to move the ProtocolHandlerRegistry class
(again, this is the CL [2] with the details).

I want to thank you for all the kind and useful reviews, which
eventually led to the conclusion that we may need a new iteration on the
discussion about the design document [3] I shared back then and the
approach I've followed to implement it. 

The main issue to discuss now is how to properly perform the refactoring
so that embedders can get advantage of the Protocol Handler logic while
still provide the implementation of the current //component interfaces.
Since //content can't depend on //component, the new design proposed to
define some specialized classes in //chrome to do it. However, this
seems not the ideal solution and it causes some layering issues
(explained in the design doc).

The alternate approach proposed in the CL reviews is basically to move
the Protocol Handler logic directly to //components.




On 10/6/21 10:57, Javier Fernandez wrote:
> Hi Dominick,
> On 10/6/21 8:15, Dominick Ng wrote:
>> I took a look at the design doc and I haven't seen any major blocking
>> concerns. I do know that Microsoft is currently doing a lot of work on
>> the protocol handler code for PWAs in particular - +cc Fabio and
>> Daniel who may also have thoughts on potentially moving the bulk of
>> the custom handler code from //chrome to //content.
> Thanks for the feedback. It's great to know that there are no blockers
> to the proposal; I understand that there are some issues that need to be
> addressed, but I think we can do it as part of the regular review
> process. I just wanted to know this work was useful and worth pursuing it.
> I'd like to get feedback from Microsoft, as you mention (I'll give edit
> permissions to those contacts you've suggested). I'd also be interested
> to get opinions from other Chromium embedders, like Brave. As far as I
> know Brave did a considerable work implementing custom protocol handlers
> for their browser and this refactoring could have a relevant impact
> (hopefully positive) on their design.
> --
> javi

Javier Fernandez

Sep 27, 2021, 5:33:10 PM9/27/21

Colin Blundell

Sep 28, 2021, 9:47:37 AM9/28/21
to Javier Fernandez, Dominick Ng, Kinuko Yasuda, Ryan Sleevi, Frédéric Wang, Yutaka Hirano, net-dev, Delan Azabani, Ben Wells, Matt Giuca, Raymes Khoury, Fabio Rocha, Daniel Murphy,,
Thanks, Javier! I left comments on the doc.

On Mon, Sep 27, 2021 at 11:26 PM Javier Fernandez <> wrote:
Reply all
Reply to author
0 new messages