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
Brave url scheme android #1007
Brave url scheme android #1007
Conversation
return (scheme1 == kBraveUIScheme && scheme2 == kChromeUIScheme) || | ||
(scheme1 == kChromeUIScheme && scheme2 == kBraveUIScheme) || | ||
(scheme1 == url::kAboutScheme && scheme2 == kBraveUIScheme) || | ||
(scheme1 == kBraveUIScheme && scheme2 == url::kAboutScheme); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think maybe you need to compare about and chrome schemes here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I need this also, as I need to compare for equality all the pairs from <brave, chrome, about>
:
brave<->chrome
brave<->about
chrome<->about
But chrome<->about
comparison is already done in IsEquivalentScheme_ChromiumImpl , https://cs.chromium.org/chromium/src/components/url_formatter/url_fixer.cc?type=cs&q=IsEquivalentScheme&g=0&l=683
bool IsEquivalentScheme(const std::string& scheme1,
const std::string& scheme2) {
return scheme1 == scheme2 ||
(scheme1 == url::kAboutScheme && scheme2 == kChromeUIScheme) ||
(scheme1 == kChromeUIScheme && scheme2 == url::kAboutScheme);
}
So I used compare chrome<->about
by invoking IsEquivalentScheme_ChromiumImp
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it currently work with typing in brave://about or another brave:// URL?
On desktop we use this instead of adding a standard scheme:
chromium_src/chrome/browser/browser_about_handler.cc
@bbondy This PR is spread over the two repos, and it is also using |
@@ -10,7 +10,13 @@ | |||
class BraveToolbarModelImpl : public ToolbarModelImpl { | |||
public: | |||
using ToolbarModelImpl::ToolbarModelImpl; | |||
#if defined(OS_ANDROID) | |||
// On Android GetURLForDisplay is not invoked as on brave-coer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: spelling of brave-core
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
8527b48
to
308edd6
Compare
308edd6
to
770c826
Compare
@AlexeyBarabash is this something that we'd still like to do? or can it be closed? |
@bsclifton I will check if |
@bsclifton |
Closing as stale - let's create a new PR if we address this in the future 😄 |
Addresses https://github.com/brave/browser-android-tabs/issues/850.
Contains adaptation of PRs #584 and #164 for re-use with Android.
Requires PR from Android https://github.com/brave/browser-android-tabs/pull/912 .
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://version
.chrome://version
page withbrave://version
in an url bar.chrome://version
Reviewer Checklist: