-
Notifications
You must be signed in to change notification settings - Fork 879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite chrome:// in edit URLs too (closes brave/brave-browser#1616) #1354
Conversation
Both GetFormattedFullURL() and GetURLForDisplay() need to be overridden in order for the URL to be displayed properly in the URL bar and to be copy/pasted properly when editing the URL.
@yrliou This is part of the patch you have already reviewed in #1074. It now only addresses brave/brave-browser#1616 since @bridiver suggested a different approach for the pdfjs bit. |
@fmarier I think the problem might be in HandleURLRewrite/HandleURLReverseRewrite in brave_content_browser_client.cc. Talking to @bbondy right now because those methods don't look right to me. Might also be related to other brave/chrome scheme issues cc @simonhong |
let's hold off on this until I can do a little investigation because I think the final fix for the issue @simonhong is working on will also take care of this |
I think this PR is valid because |
@simonhong that shouldn't matter with the URLHandler and I think I see what the problem might be |
I'm 95% sure this entire problem is the result of incorrectly changing the virtual url from brave to chrome. Please don't merge this until I get back to you. |
To start navigation of brave webui(brave scheme url), it should be mapped to chrome scheme. |
@simonhong because we're mapping from brave -> chrome in the fixup handler so we're modifying the virtual url to be
|
|
Hmm, I think if we pass |
I actually think we want to do the exact opposite of what we're doing now in the fixup handler. We should be mapping |
@simonhong I don't think this will fix the issue you are working on because the mapping is still happening too late, but it should remove the need for this PR and BraveLocationBarModelImpl in general |
I'll think about this comment more. |
@simonhong you don't have to think about it because I just implemented it and seems to work correctly :) |
wouldn't this make various UI components which check against the chrome scheme exactly not work properly? |
@bbondy no, that is the entire purpose of virtual urls. The virtual urls are display-only |
replace by #1385 which maps the virtual url so we don't have to change the urlbar behavior |
Both GetFormattedFullURL() and GetURLForDisplay() need to be overridden in
order for the URL to be displayed properly in the URL bar and to be copy/pasted
properly when editing the URL.
Submitter Checklist:
npm test brave_unit_tests && npm test brave_browser_tests
) ongit rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
brave://settings
.Reviewer Checklist: