Skip to content
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 dependency on profile and use local state "ads enabled" pref in stats updater #16026

Merged
merged 7 commits into from
Jan 20, 2023

Conversation

DJAndries
Copy link
Collaborator

Resolves brave/brave-browser#26864
Resolves brave/brave-browser#4599

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

Ensure the ads enabled parameter in usage ping reflects the ads enabled setting of the last loaded profile.

@DJAndries DJAndries changed the title Stats updater local ads enabled Remove dependency on profile and use local state "ads enabled" pref in stats updater Nov 18, 2022
Copy link
Member

@simonhong simonhong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ brave_referrals_service.cc

Copy link
Collaborator

@tmancey tmancey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM++

browser/brave_ads/ads_stats_updater_helper.cc Outdated Show resolved Hide resolved
browser/brave_ads/ads_stats_updater_helper.cc Outdated Show resolved Hide resolved
@DJAndries DJAndries force-pushed the stats-updater-local-ads-enabled branch 2 times, most recently from 6f5fd85 to cbc3483 Compare December 7, 2022 21:01
@bridiver
Copy link
Collaborator

bridiver commented Dec 8, 2022

need tests for stats_updater_helper

@DJAndries DJAndries force-pushed the stats-updater-local-ads-enabled branch 2 times, most recently from 339ec6d to baeaf28 Compare December 9, 2022 02:38
@DJAndries DJAndries force-pushed the stats-updater-local-ads-enabled branch from baeaf28 to 2dd782c Compare December 12, 2022 23:59
@@ -676,6 +681,7 @@ test("brave_browser_tests") {
"//brave/app/brave_main_delegate_browsertest.cc",
"//brave/app/brave_main_delegate_runtime_flags_browsertest.cc",
"//brave/browser/brave_ads/ads_service_browsertest.cc",
"//brave/browser/brave_ads/brave_stats_updater_helper_browsertest.cc",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shouldn't be added directly here, it should go in a test target in the BUILD.gn for brave_stats and be added here (and for android browser tests) as a dep

@DJAndries DJAndries force-pushed the stats-updater-local-ads-enabled branch 2 times, most recently from 00d2fae to 20181cf Compare December 21, 2022 18:56
@DJAndries DJAndries force-pushed the stats-updater-local-ads-enabled branch from 20181cf to 0710225 Compare January 17, 2023 23:36
@DJAndries DJAndries force-pushed the stats-updater-local-ads-enabled branch from 0710225 to 4f5e980 Compare January 18, 2023 01:55
@DJAndries DJAndries merged commit 9464b6f into master Jan 20, 2023
@DJAndries DJAndries deleted the stats-updater-local-ads-enabled branch January 20, 2023 19:30
@github-actions github-actions bot added this to the 1.49.x - Nightly milestone Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants