-
Notifications
You must be signed in to change notification settings - Fork 873
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
Modularize brave news internals #26445
base: master
Are you sure you want to change the base?
Conversation
@@ -30,24 +30,18 @@ WEB_UI_CONTROLLER_TYPE_IMPL(BraveNewsInternalsUI) | |||
|
|||
void BraveNewsInternalsUI::BindInterface( | |||
mojo::PendingReceiver<brave_news::mojom::BraveNewsController> receiver) { | |||
auto* profile = Profile::FromWebUI(web_ui()); | |||
auto* controller = |
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.
Do we store the controller as a member to ensure we always call Bind
on the same controller instance? Is this best practise, or is there a special reason that this component needs to do it?
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.
It's because we can't modularize this code with the factory and we should be using dependency injection. This was discussed recently https://bravesoftware.slack.com/archives/C7VLGSR55/p1729368619704789
Resolves
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 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: