Issue 3816: Disabling metrics services provider #2095
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Initial patch for disabling metrics services (https://github.com/brave/brave-core/pull/2029/files#diff-df788f5fb2dd4d6366315886d1b2a0b2) was incompatible with C73, so we ended up reverting it with C74-revert.
This updated patch works with C73 but, uses patches:
https://github.com/brave/brave-core/pull/2095/files
The problem is the code that checks for enable reporting in C74 is:
With C74, this worked because it was able to override
IsReportingEnabled
function inEnabledStateProvider
to return false.In C73 the code:
I investigated subclassing
ChromeEnabledStateProvider
,ChromeMetricsServicesManagerClient
but that did not work. DisablingkMetricsReportingFeature
does not work as well as its enabled byfield_trials
.This patch will be reverted with C74, and we can use the override then
fix brave/brave-browser#3816
Submitter Checklist:
npm test brave_unit_tests && npm test brave_browser_tests && npm run test-security
) onnpm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
npm run network-audit
should pass.or
Reviewer Checklist: