Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions src/main/java/org/prebid/server/privacy/PrivacyExtractor.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,6 @@ public class PrivacyExtractor {
private static final String DEFAULT_GPP_VALUE = "";
private static final List<Integer> DEFAULT_GPP_SID_VALUE = Collections.emptyList();

/**
* Retrieves:
* <p><ul>
* <li>gdpr from regs.ext.gdpr
* <li>consent from user.consent
* <li>us_privacy from regs.ext.us_privacy
* <li>coppa from regs.coppa
* </ul><p>
* And construct {@link Privacy} from them. Use default values in case of invalid value.
*/
public Privacy validPrivacyFrom(BidRequest bidRequest, List<String> errors) {
return extractPrivacy(bidRequest.getRegs(), bidRequest.getUser(), errors);
}
Expand Down Expand Up @@ -91,8 +81,8 @@ private static List<Integer> parseGppSid(String gppSid) {
}

private Privacy extractPrivacy(Regs regs, User user, List<String> errors) {
final Integer extRegsGdpr = regs != null ? regs.getGdpr() : null;
final String gdpr = extRegsGdpr != null ? Integer.toString(extRegsGdpr) : null;
final Integer regsGdpr = regs != null ? regs.getGdpr() : null;
final String gdpr = regsGdpr != null ? Integer.toString(regsGdpr) : null;
final String consent = user != null ? user.getConsent() : null;
final String usPrivacy = regs != null ? regs.getUsPrivacy() : null;
final Integer coppa = regs != null ? regs.getCoppa() : null;
Expand Down
Loading