canmove, Confirmed users
1,537
edits
| Line 74: | Line 74: | ||
''Granularity'': Initially, we will create 50 buckets of width 10. The first bucket will be 0-9, and the last bucket will be for sites that have attempted to set third party cookies 500 or more times in the last 24 hours. | ''Granularity'': Initially, we will create 50 buckets of width 10. The first bucket will be 0-9, and the last bucket will be for sites that have attempted to set third party cookies 500 or more times in the last 24 hours. | ||
=== Implementation === | |||
Create a hashtable (ht) keyed on third party sites (domain stripped to ETLD+1). | |||
Each entry x of ht is a pair of counts: { blocked, allowed } | |||
* ht[x].blocked = number of loads where x's set-cookie was blocked as a third party | |||
* ht[x].allowed = number of loads where x's set-cookie was allowed as a third party | |||
On attempted set-cookie: | |||
if domain (ETLD+1) x is thirdparty: | |||
if set-cookie is blocked by policy: | |||
ht[x].blocked++ | |||
else | |||
ht[x].allowed++ | |||
On roll-up (prepare to ping): | |||
HA, HB = new histograms. | |||
for each key x in ht: | |||
HA.incrementBucketFor(ht[x].allowed) | |||
HB.incrementBucketFor(ht[x].blocked) | |||
Reset ht and HA, HB per session. | |||
=== Expected Results === | === Expected Results === | ||