-
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
Remove dom_distiller dependency from BraveAds #17366
Conversation
@@ -47,7 +46,6 @@ AdsServiceFactory::AdsServiceFactory() | |||
"AdsService", | |||
BrowserContextDependencyManager::GetInstance()) { | |||
DependsOn(NotificationDisplayServiceFactory::GetInstance()); | |||
DependsOn(dom_distiller::DomDistillerServiceFactory::GetInstance()); |
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.
@boocmp fyi
it seems there are unused
|
// get all browser tests crashing when dom_distiller::RunIsolatedJavaScript() | ||
// gets called from AdsTabHelper::RunIsolatedJavaScript() (called via the | ||
// WebContentsObserver machinery), since the JS World ID won't be set yet when | ||
// dom_distiller::RunIsolatedJavaScript() gets called. | ||
absl::optional<int> ChromeMainDelegate::BasicStartupComplete() { | ||
BraveCommandLineHelper command_line(base::CommandLine::ForCurrentProcess()); | ||
command_line.AppendSwitch(switches::kDisableDomainReliability); |
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.
Should we remove command_line.AppendSwitch(switches::kEnableDomDistiller);
?
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 tried, but removing this line hides the speed-reader icon in Brave.
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.
thats because we have #define ReaderIconView SpeedreaderIconView
:/
also there is a dep in |
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++
These are still needed for |
Fixed, thanks for pointing out these. The patch becomes unused after PR #4649. |
@@ -27,6 +26,15 @@ | |||
|
|||
namespace brave_ads { | |||
|
|||
namespace { | |||
|
|||
constexpr char16_t kGetDocumentHTMLScript[] = |
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.
We're injecting this into every page? This seems like a probable perf issue, but what exactly are we using this for anyway? If the purpose of this is to get page content, this is definitely not what we should be doing
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.
also this appears to be happening even if ads is disabled?
Resolves brave/brave-browser#28751
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: