-
Notifications
You must be signed in to change notification settings - Fork 921
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
Disable IPFS WebUI on Android #17999
Conversation
c8892b1
to
d3e3741
Compare
d3e3741
to
94c3d2a
Compare
<message name="IDS_IPFS_ADDRESSES_CONFIG_TITLE" desc="Title of addresses config section">Addresses</message> | ||
<message name="IDS_IPFS_REPO_STATS_TITLE" desc="Title of repo stats section">Repo Stats</message> | ||
<message name="IDS_IPFS_NODE_INFO_TITLE" desc="Title of node info section">Node info</message> | ||
<if expr="enable_ipfs_internals_webui"> |
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.
Below are the strings from this section:
https://github.com/brave/brave-core/blob/master/browser/ui/webui/brave_webui_source.cc#L713
@@ -294,10 +294,12 @@ void IpfsImportController::OnWebPageImportCompleted( | |||
|
|||
void IpfsImportController::OnImportCompleted(const ipfs::ImportedData& data) { | |||
auto link = CreateAndCopyShareableLink(data); | |||
#if BUILDFLAG(ENABLE_IPFS_INTERNALS_WEBUI) |
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.
This may look strange, but on desktop this flag is true, and on Android whole IpfsImportController
class seems to be unused, but compiled. It looks it will be fixed with brave/brave-browser#28060.
My attempt to make it failed - https://github.com/brave/brave-core/compare/android_no_ipfs_webui_BAK01?expand=1#diff-87dbeae647f32aa0670c977a84d99be9862a63bf9cc1f0a8b191da86f1d1a21fR11 - with such change I could not open ipfs:// pages at all.
Converted to draft as the unit test has failed on Android and error is related to the PR |
2d7a9f2
to
3f4b048
Compare
CI fails with some tests on Windows-x86/Windows-x64, which are not related to the PR. I am going to open the PR again for the review. |
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.
++
Is disabling enable_ipfs_local_node on android is much harder to implement than using separate build flag? |
At this PR I tried to remove the obviously unused or useless data from APK. I mentioned above that direct disabling I don't know which classes should be under In anyway, when brave/brave-browser#28060 will be fixed, current PR will still be useful, it will allow to exclude ipfs-internals page resources and handlers depending on the |
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.
LGTM
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.
chromium_src
, DEPS
lgtm
21aefb7
to
6d241f9
Compare
Squashed and rebased |
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.
strings ++
6d241f9
to
b3cd5ce
Compare
Rebased and resolved conflict |
Fixes brave/brave-browser#29697. Fixes brave/brave-browser#25103. Excluded iOS from enable_ipfs_internals_webui flag (codereview notice) Assert to ensure ipfs-internals web UI is not built on iOS (codereview notice) Removed unnecessary #if #endif (codereview notice)
b3cd5ce
to
944883e
Compare
Rebased again. |
Resolves brave/brave-browser#29697
Resolves brave/brave-browser#25103
This PR removes resources and some native code for ipfs-internals web ui page on Android. It allows to save only 162KB for now. This result may be improved with fixing of brave/brave-browser#28060 .
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run lint
,npm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
Use a public gateway