-
Notifications
You must be signed in to change notification settings - Fork 900
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
Add WebTorrent component extension when session restoring webtorrent tabs #6085
Conversation
1841490
to
e9df185
Compare
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
+import("//brave/browser/ui/ui.gni") |
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.
you don't need to import anything for this, just put it in build/config/brave_build.gni
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.
There was an import loop in this case.
As discussed on slack, add a target in chromium/chrome/browser/ui
with required deps and let brave/browser/ui
depends on that target in
fc0d608
browser/ui/ui.gni
Outdated
] | ||
|
||
if (enable_brave_webtorrent) { | ||
brave_browser_ui_deps += [ |
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.
maybe a comment here that it's for the chromium_src files?
namespace { | ||
|
||
#if BUILDFLAG(ENABLE_BRAVE_WEBTORRENT) | ||
void MaybeLoadWebtorrent(Browser* browser, |
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 don't think we want to duplicate the code from BraveWebTorrentNavigationThrottle, maybe you can create a static method on BraveWebTorrentNavigationThrottle or something?
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.
Addressed in fc0d608
@@ -57,6 +58,17 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | |||
registry->RegisterBooleanPref(kWebTorrentEnabled, true); | |||
} | |||
|
|||
bool IsWebtorrentPage(const GURL& url) { |
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 IsWebtorrentURL
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.
Addressed in 2a601f7
CI has unrelated failure:
dist on Windows:
|
2a601f7
to
f69a0c2
Compare
Latest force push is just for squashing into one commit, will cancel CI builds. Merging. |
Thank you for implementing this @yrliou. You're the best! |
Resolves brave/brave-browser#7330
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.