-
Notifications
You must be signed in to change notification settings - Fork 885
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
Import browser laptop stats #315
Conversation
Built and tested successfully on macOS and Linux. |
dcd6652
to
ee36252
Compare
Rebased on latest master to include c3d0cb0 (fixes Windows builds) so I can test on Windows. |
Built and tested successfully on Windows. |
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.
Only one typo and overall looks good.
I know we have brave/brave-browser#511 recorded so I didn't ask patch reduction here.
app/brave_generated_resources.grd
Outdated
@@ -89,6 +89,9 @@ | |||
<message name="IDS_SETTINGS_IMPORT_COOKIES_CHECKBOX" desc="Checkbox for importing cookies"> | |||
Cookies | |||
</message> | |||
<message name="IDS_SETTINGS_IMPORT_STATS_CHECKBOX" desc="Checkvbox for importing stats"> |
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.
s/Checkvbox/Checkbox/
I appreciate that! I did spend some time looking for ways to minimize the patches, but didn't see any quick wins. The patches this adds are so straightforward and in tandem with patches from previous importer PR's that I agree it makes sense to try to minimize them as part of a unified effort. |
lgtm, can you squash c5bdf7ae61eb36a7853708121fabdb224b63c521 into 8d16a19e93ab31f790d6ff683ec4aaba166e0dee? And I will approve, thanks. |
c5bdf7a
to
fdc4cb1
Compare
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.
++
void BraveProfileWriter::UpdateStats(const BraveStats& stats) { | ||
PrefService* prefs = profile_->GetOriginalProfile()->GetPrefs(); | ||
|
||
prefs->SetUint64(kAdsBlocked, |
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'm not going to block on this @garrettr but if you have time for a follow up I'd prefer to have this take the greater of the 2 stats and use that. That way someone can't as easily game it by importing multiple times.
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.
@bbondy Blocking on that is no problem, it's a quick fix! I'll do it right now
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 was too fast for you, so you'll have to PR again, but can be from the same branch obviously.
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.
actually I wasn't too fast for you but I was too slow to read your reply and too fast to merge 😆
Fix brave/brave-browser#2439 - Clock AM / PM font size Use brave-ui welcome images instead of brave-core ``` * 4e07f89 - (59 minutes ago) Merge pull request #315 from brave/revert-sync-59 — Pete Miller (HEAD -> brave-core-0.59.x, origin/brave-core-0.59.x) |\ | * fb7deb8 - (69 minutes ago) Revert "sync v2" — Cezar Augusto | * c5e16c7 - (69 minutes ago) Revert "Merge pull request #308 from brave/sync_img" — Cezar Augusto |/ * c4694e2 - (20 hours ago) Merge pull request #247 from brave/c71-clock-period — Pete Miller * a2443d8 - (4 days ago) do not count first letter if space in textareaclipboard — Cezar Augusto * 2c16ae2 - (5 days ago) Merge pull request #308 from brave/sync_img — Cezar Augusto * 7d9811c - (3 weeks ago) sync v2 — Cezar Augusto * 3e3be2f - (4 days ago) update snapshot from walletSummary — Cezar Augusto * a4c4dbd - (5 days ago) Merge pull request #309 from brave/welcome_img — Pete Miller ```
Closes brave/brave-browser#630.
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Manual
jq '.adblock, .httpsEverywhere, .trackingProtection | .count' ~/Library/Application\ Support/brave/session-store-1
.yarn start
Automated
yarn test brave_unit_tests
.BraveImporter.ImportStats
should pass.Reviewer Checklist: