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

stats: Add dtoi param to usage ping #5720

Merged
merged 1 commit into from
Jun 5, 2020
Merged

stats: Add dtoi param to usage ping #5720

merged 1 commit into from
Jun 5, 2020

Conversation

kkuehlz
Copy link
Contributor

@kkuehlz kkuehlz commented Jun 2, 2020

Resolves brave/brave-browser#10061

Resolves

Submitter Checklist:

Test Plan:

  1. Open network sniffing tool (Charles, Wireshark)
  2. Ensure that the browser sends a request to https://laptop-updates.brave.com/1/usage/brave_core with query parameter set to the current date
  3. Move system clock forward 14 days and see that this parameter is sent up as null.

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@kkuehlz kkuehlz requested review from emerick and simonhong June 2, 2020 23:52
@kkuehlz
Copy link
Contributor Author

kkuehlz commented Jun 2, 2020

browser/brave_stats_updater_params.cc Outdated Show resolved Hide resolved
browser/brave_stats_updater_params.cc Outdated Show resolved Hide resolved
browser/brave_stats_updater_params.cc Outdated Show resolved Hide resolved
@kkuehlz
Copy link
Contributor Author

kkuehlz commented Jun 3, 2020

cc @emerick I went ahead and refactored the referral code to be part of the shared stats utils. Reading the sentinel actually won't block (left comment), so it ends up working out nicely without callbacks. I'm thinking we get this merged first, and I'll rebase #5721 on master and have the referral factory use this method and pass the result to the ctor (as @simonhong has suggested for other shared code).

Copy link
Contributor

@emerick emerick left a comment

Choose a reason for hiding this comment

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

LGTM, just one minor comment.

browser/brave_stats_updater_params.cc Outdated Show resolved Hide resolved
kkuehlz added a commit to brave/vault-updater that referenced this pull request Jun 4, 2020
@kkuehlz kkuehlz mentioned this pull request Jun 4, 2020
kkuehlz added a commit to brave/vault-updater that referenced this pull request Jun 5, 2020
kkuehlz pushed a commit to brave/vault-updater that referenced this pull request Jun 5, 2020
* core: Add support for dtoi usage ping parameter

Server side implementation for brave/brave-core#5720

* Allow developer build running testing instance
@kkuehlz kkuehlz merged commit 9e31877 into master Jun 5, 2020
@kkuehlz kkuehlz deleted the stats_dtoi branch June 5, 2020 16:59
@bbondy bbondy added this to the 1.12.x - Nightly milestone Jun 10, 2020
@bbondy
Copy link
Member

bbondy commented Jun 10, 2020

Just a reminder to please set the milestone on PRs for the milestone they are landing in.
I updated this time.

@kjozwiak
Copy link
Member

kjozwiak commented Jul 7, 2020

Verification PASSED on macOS 10.15.5 x64 Catalina using the following build:

Brave | 1.12.77 Chromium: 84.0.4147.68 (Official Build) nightly (64-bit)
-- | --
Revision | e7b7234037639b407e69c5428c891ce018cd6c0d-refs/branch-heads/4147@{#772}
OS | macOS Version 10.15.5 (Build 19F101)

Ensured that dtoi=2020-07-07 on initial install as per the following:

https://laptop-updates.brave.com/1/usage/brave-core?platform=osx-bc&channel=nightly&version=1.12.72&daily=true&weekly=true&monthly=true&first=true&woi=2020-07-06&dtoi=2020-07-07&ref=BRV001

Moved the MBP time ~14 days ahead and ensured that dtoi=null as per the following:

https://laptop-updates.brave.com/1/usage/brave-core?platform=osx-bc&channel=nightly&version=1.12.72&daily=true&weekly=true&monthly=false&first=false&woi=2020-07-06&dtoi=null&ref=BRV001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Send dtoi param with usage ping
4 participants