-
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
Send platform, build channel and country code as part of ad confirmation calls where it meets privacy standards #5067
Conversation
5a5ecbf
to
22b4e4c
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.
iOS lgtm
43327f5
to
a2c3ad5
Compare
@@ -35,6 +37,80 @@ const uint64_t kDebugNextTokenRedemptionAfterSeconds = | |||
const uint64_t kRetryFailedConfirmationsAfterSeconds = | |||
5 * base::Time::kSecondsPerMinute; | |||
|
|||
const std::map<std::string, bool> kLargeAnonymityCountryCodes = { |
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.
what is the size bound on these and when was it generated? just checking
it seems that the only new info this adds is the build channel (though isn't that already inferable from the user agent?). we might want to make the country bound larger since when i originally did the analysis, i did not factor in build channel. |
f68b9a3
to
a90f3ea
Compare
I have checked release, beta and nightly builds and unfortunately, the build channel is not available in the user-agent, thanks |
common/brave_channel_info.cc
Outdated
|
||
return channel_name; | ||
#else // OFFICIAL_BUILD | ||
return "development"; |
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.
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.
The 'developer' channel is available on stats in the database. We would need to add the 'developer' identifier to a few drop down menus. This would not be a large change to make.
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 would suggest 'developer' instead of 'development' as that exists on stats already.
channel | description | label
-----------+---------------------+------------------
...
developer | Developer channel | Developer
...
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.
Changed development
developer
, thanks
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 other than @iefremov 's comments which you have follow up issues for.
757ce20
to
a7a49f6
Compare
macOS and iOS failed CI, restarting |
d9dc885
to
8d24826
Compare
…ion calls where it meets privacy standards
CI failed for macOS, restarting macOS |
Restarting macOS as failed CI |
Failed due to unrelated rewards browser tests |
|
||
namespace android_util { | ||
|
||
ledger::ClientInfoPtr GetAndroidClientInfo() { | ||
auto info = ledger::ClientInfo::New(); | ||
info->platform = ledger::Platform::ANDROID_R; | ||
info->os = ledger::OperatingSystem::UNDEFINED; | ||
info->channel = brave::GetChannelName(); |
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.
when this is fixed to use chrome::GetChannelName the layering violation here needs to be fixed as well. You cannot use brave/common or chrome/common in components
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.
cc @aseren FYI for the refactoring we spoke about
@@ -3273,6 +3274,8 @@ ledger::ClientInfoPtr GetDesktopClientInfo() { | |||
info->os = ledger::OperatingSystem::UNDEFINED; | |||
#endif | |||
|
|||
info->channel = brave::GetChannelName(); |
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.
chrome::GetChannelName
should be passed to RewardsServiceImpl in the factory to eliminate this layering violation
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.
@bridiver raised brave/brave-browser#12769 for Rewards and brave/brave-browser#12768 for Ads
Resolves brave/brave-browser#8100
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Use Charles Proxy to capture traffic and confirm the request to the
POST /v1/confirmation/{confirmation_id}/{credential}
server end-point contains the following in the body:countryCode
i.e.US
if the country has large anonymity, see brave/brave-browser#8100 for list of countries (only added forrelease
builds)platform
i.e.macos
,windows
,linux
,android
orios
channelName
i.e.release
,beta
,nightly
ordev
Reviewer Checklist:
After-merge Checklist:
changes has landed on.