Code review comment for lp:~abreu-alexandre/webbrowser-app/intent

Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

> OK, now that looks better (my comment went in just after your change).
>
> I’m wondering, why does the function receive an object that has 'scheme',
> 'host' and 'uri' as keys?
> Wouldn’t it be enough to pass the function a string (the full intent:// URI)
> and expect a string (the transformed http:// URI) in return?

imo no, I wrote it this way to be very strict & avoid any error that could come
from something that is user defined. I did not want to let the intent parsing
be hosted in the function itself, it would not make sense imo and be possibly
error prone.

Hence, a strict (already parsed) intent description is passed down to the function
and something very strict is expected in return, not some random data,

> Also, is it really useful to allow the custom intent file to have a different
> name than the default one? It seems it adds a lot of logic for no apparent
> gain.

I though it could be something useful, but I can remove this, I am not strongly
opinionated about it :)

« Back to merge proposal