Bug 197215 - Remove Ad Click Attribution data when removing website data
Summary: Remove Ad Click Attribution data when removing website data
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: John Wilander
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-04-23 15:20 PDT by John Wilander
Modified: 2019-04-23 17:13 PDT (History)
3 users (show)

See Also:


Attachments
Patch (28.79 KB, patch)
2019-04-23 16:02 PDT, John Wilander
no flags Details | Formatted Diff | Diff
Patch for landing (28.68 KB, patch)
2019-04-23 16:55 PDT, John Wilander
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Wilander 2019-04-23 15:20:56 PDT
Calls to WebsiteDataStore::removeData() should remove Ad Click Attribution data.
Comment 1 John Wilander 2019-04-23 15:21:18 PDT
<rdar://problem/47668988>
Comment 2 John Wilander 2019-04-23 16:02:23 PDT
Created attachment 368076 [details]
Patch
Comment 3 Chris Dumez 2019-04-23 16:08:56 PDT
Comment on attachment 368076 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=368076&action=review

> Source/WebKit/NetworkProcess/AdClickAttributionManager.cpp:181
> +    m_unconvertedAdClickAttributionMap.removeIf([domain = domain](auto& keyAndValue) {

domain = domain
should be
&domain

> Source/WebKit/NetworkProcess/AdClickAttributionManager.cpp:182
> +        if (keyAndValue.key.first.registrableDomain == domain || keyAndValue.key.second.registrableDomain == domain)

could be written on one line:
return keyAndValue.key.first.registrableDomain == domain || keyAndValue.key.second.registrableDomain == domain;

> Source/WebKit/NetworkProcess/AdClickAttributionManager.cpp:187
> +    m_convertedAdClickAttributionMap.removeIf([domain = WTFMove(domain)](auto& keyAndValue) {

ditto, should be &domain.

> Source/WebKit/NetworkProcess/AdClickAttributionManager.cpp:188
> +        if (keyAndValue.key.first.registrableDomain == domain || keyAndValue.key.second.registrableDomain == domain)

ditto, could be written on 1 line.
Comment 4 John Wilander 2019-04-23 16:37:40 PDT
(In reply to Chris Dumez from comment #3)
> Comment on attachment 368076 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=368076&action=review
> 
> > Source/WebKit/NetworkProcess/AdClickAttributionManager.cpp:181
> > +    m_unconvertedAdClickAttributionMap.removeIf([domain = domain](auto& keyAndValue) {
> 
> domain = domain
> should be
> &domain
> 
> > Source/WebKit/NetworkProcess/AdClickAttributionManager.cpp:182
> > +        if (keyAndValue.key.first.registrableDomain == domain || keyAndValue.key.second.registrableDomain == domain)
> 
> could be written on one line:
> return keyAndValue.key.first.registrableDomain == domain ||
> keyAndValue.key.second.registrableDomain == domain;
> 
> > Source/WebKit/NetworkProcess/AdClickAttributionManager.cpp:187
> > +    m_convertedAdClickAttributionMap.removeIf([domain = WTFMove(domain)](auto& keyAndValue) {
> 
> ditto, should be &domain.
> 
> > Source/WebKit/NetworkProcess/AdClickAttributionManager.cpp:188
> > +        if (keyAndValue.key.first.registrableDomain == domain || keyAndValue.key.second.registrableDomain == domain)
> 
> ditto, could be written on 1 line.

Thank you, I will fix all these things.
Comment 5 John Wilander 2019-04-23 16:55:01 PDT
Created attachment 368086 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2019-04-23 17:13:06 PDT
Comment on attachment 368086 [details]
Patch for landing

Clearing flags on attachment: 368086

Committed r244572: <https://trac.webkit.org/changeset/244572>
Comment 7 WebKit Commit Bot 2019-04-23 17:13:07 PDT
All reviewed patches have been landed.  Closing bug.