SecurityEngineering/ThirdPartyCookies/Telemetry: Difference between revisions

Jump to navigation Jump to search
m
Line 80: Line 80:
Create a hashtable (ht) keyed on third party sites (domain stripped to ETLD+1).   
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 }
Each entry x of ht is a pair of counts: { blockedAttempts, allowedAttempts }
* ht[x].blocked = number of loads where x's set-cookie was blocked as a third party
* ht[x].blockedAttempts = 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
* ht[x].allowedAttempts = number of loads where x's set-cookie was allowed as a third party




Line 88: Line 88:
   if domain (ETLD+1) x is thirdparty:
   if domain (ETLD+1) x is thirdparty:
     if set-cookie is blocked by policy:
     if set-cookie is blocked by policy:
       ht[x].blocked++
       ht[x].blockedAttempts++
     else
     else
       ht[x].allowed++
       ht[x].allowedAttempts++


On roll-up (prepare to ping):
On roll-up (prepare to ping):
   HA, HB = new histograms.
   HA, HB = new histograms.
   for each key x in ht:
   for each key x in ht:
     HA.incrementBucketFor(ht[x].allowed)
     HA.incrementBucketFor(ht[x].allowedAttempts)
     HB.incrementBucketFor(ht[x].blocked)
     HB.incrementBucketFor(ht[x].blockedAttempts)


Reset ht and HA, HB per session.
Reset ht and HA, HB per session.
canmove, Confirmed users
1,537

edits

Navigation menu