Skip to content

Commit

Permalink
Merge pull request #238 from gtanzer/gtanzer-topics-enrollment
Browse files Browse the repository at this point in the history
Topics enrollment check
  • Loading branch information
xyaoinum authored Sep 8, 2023
2 parents 698e97e + ef4d815 commit c040250
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ spec: html; urlPrefix: https://www.rfc-editor.org/rfc/
- |document| is not [=allowed to use=] the <code><a href="#browsing-topics-policy-controlled-feature">browsing-topics</a></code> feature.
- |document| is not [=allowed to use=] the <code><a href="#interest-cohort-policy-controlled-feature">interest-cohort</a></code> feature.
- The user preference setting disallows the access to topics from |topLevelDocument| given |document|'s [=Document/origin=].
- Access to topics from |topLevelDocument| given |document|'s [=Document/origin=] is disabled due to some other user agent-defined mechanism, like lack of <a href="https://github.com/privacysandbox/attestation">enrollment</a>.

Note: In Chrome's experimentation phase, it will additionally require a valid <a href="https://github.com/GoogleChrome/OriginTrials/blob/gh-pages/explainer.md">Origin Trial</a> token to exist in |document|.

Expand Down Expand Up @@ -556,7 +557,7 @@ spec: html; urlPrefix: https://www.rfc-editor.org/rfc/
1. Let |moment| be the result of running [=coarsen time=] algorithm given |unsafeMoment| and [=wall clock=] as input.
1. Let |fromUnixEpochTime| be the [=duration from=] the [=Unix epoch=] to |moment|.
1. Set |topicsCallerContext|'s [=topics caller context/timestamp=] to |fromUnixEpochTime|.
1. If the user preference setting disallows the access to topics from |topLevelDocument| given |requestOrigin|, then return.
1. If the user preference setting disallows the access to topics from |topLevelDocument| given |requestOrigin|, or access to topics from |topLevelDocument| given |requestOrigin| is disabled due to some other user agent-defined mechanism, like lack of <a href="https://github.com/privacysandbox/attestation">enrollment</a>, then return.
1. Let |topics| be the result of running the [=calculate the topics for caller=] algorithm, with |topicsCallerContext| as input.
1. Let |numVersionsInEpochs| be the result of running the [=get the number of distinct versions in epochs=] algorithm, with |topicsCallerContext| as input.
1. Let |versionsToTopics| be an [=ordered map=].
Expand Down

0 comments on commit c040250

Please sign in to comment.