Changeset 285327 in webkit
- Timestamp:
- Nov 4, 2021, 7:45:31 PM (4 years ago)
- Location:
- branches/safari-612-branch/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-612-branch/Source/WebCore/ChangeLog
r285325 r285327 213 213 * svg/SVGGraphicsElement.cpp: 214 214 (WebCore::SVGGraphicsElement::animatedLocalTransform const): 215 216 2021-11-04 Russell Epstein <repstein@apple.com>217 218 Apply patch. rdar://problem/80991209219 220 2021-11-04 Kate Cheney <katherine_cheney@apple.com>221 222 PCM: Safari on iOS and macOS are not sending ad click attribution reports for Private Click Measurement223 https://bugs.webkit.org/show_bug.cgi?id=228104224 <rdar://problem/80991209>225 226 Reviewed by John Wilander.227 228 No new tests. Several existing tests would timeout with the removal of229 m_firePendingAttributionRequestsTimer.startOneShot(m_isRunningTest ? 0_s : seconds)230 if the fix wasn't in place.231 232 * loader/PrivateClickMeasurement.cpp:233 (WebCore::randomlyBetweenTwentyFourAndFortyEightHours):234 (WebCore::PrivateClickMeasurement::attributeAndGetEarliestTimeToSend):235 * loader/PrivateClickMeasurement.h:236 215 237 216 2021-11-04 Russell Epstein <repstein@apple.com> -
branches/safari-612-branch/Source/WebCore/loader/PrivateClickMeasurement.cpp
r285313 r285327 149 149 } 150 150 151 static Seconds randomlyBetweenTwentyFourAndFortyEightHours( PrivateClickMeasurement::IsRunningLayoutTest isRunningTest)152 { 153 return isRunningTest == PrivateClickMeasurement::IsRunningLayoutTest::Yes ? 1_s :24_h + Seconds(randomNumber() * (24_h).value());154 } 155 156 PrivateClickMeasurement::AttributionSecondsUntilSendData PrivateClickMeasurement::attributeAndGetEarliestTimeToSend(AttributionTriggerData&& attributionTriggerData , IsRunningLayoutTest isRunningTest)151 static Seconds randomlyBetweenTwentyFourAndFortyEightHours() 152 { 153 return 24_h + Seconds(randomNumber() * (24_h).value()); 154 } 155 156 PrivateClickMeasurement::AttributionSecondsUntilSendData PrivateClickMeasurement::attributeAndGetEarliestTimeToSend(AttributionTriggerData&& attributionTriggerData) 157 157 { 158 158 if (!attributionTriggerData.isValid() || (m_attributionTriggerData && m_attributionTriggerData->priority >= attributionTriggerData.priority)) … … 162 162 // 24-48 hour delay before sending. This helps privacy since the conversion and the attribution 163 163 // requests are detached and the time of the attribution does not reveal the time of the conversion. 164 auto sourceSecondsUntilSend = randomlyBetweenTwentyFourAndFortyEightHours( isRunningTest);165 auto destinationSecondsUntilSend = randomlyBetweenTwentyFourAndFortyEightHours( isRunningTest);164 auto sourceSecondsUntilSend = randomlyBetweenTwentyFourAndFortyEightHours(); 165 auto destinationSecondsUntilSend = randomlyBetweenTwentyFourAndFortyEightHours(); 166 166 m_timesToSend = { WallTime::now() + sourceSecondsUntilSend, WallTime::now() + destinationSecondsUntilSend }; 167 167 -
branches/safari-612-branch/Source/WebCore/loader/PrivateClickMeasurement.h
r285313 r285327 56 56 enum class PcmDataCarried : bool { NonPersonallyIdentifiable, PersonallyIdentifiable }; 57 57 enum class AttributionReportEndpoint : bool { Source, Destination }; 58 enum class IsRunningLayoutTest : bool { No, Yes };59 58 60 59 struct SourceID { … … 328 327 WEBCORE_EXPORT static const Seconds maxAge(); 329 328 WEBCORE_EXPORT static Expected<AttributionTriggerData, String> parseAttributionRequest(const URL& redirectURL); 330 WEBCORE_EXPORT AttributionSecondsUntilSendData attributeAndGetEarliestTimeToSend(AttributionTriggerData&& , IsRunningLayoutTest);329 WEBCORE_EXPORT AttributionSecondsUntilSendData attributeAndGetEarliestTimeToSend(AttributionTriggerData&&); 331 330 WEBCORE_EXPORT bool hasHigherPriorityThan(const PrivateClickMeasurement&) const; 332 331 WEBCORE_EXPORT URL attributionReportSourceURL() const; -
branches/safari-612-branch/Source/WebKit/ChangeLog
r285313 r285327 1 2021-11-04 Russell Epstein <repstein@apple.com>2 3 Apply patch. rdar://problem/809912094 5 2021-11-04 Kate Cheney <katherine_cheney@apple.com>6 7 PCM: Safari on iOS and macOS are not sending ad click attribution reports for Private Click Measurement8 https://bugs.webkit.org/show_bug.cgi?id=2281049 <rdar://problem/80991209>10 11 Reviewed by John Wilander.12 13 firePendingAttributionRequests() was sometimes scheduling the next timer14 fire to be the raw time value instead of the difference between now15 and the scheduled send time. This was resulting in some reports not being16 sent within the 24-48 hour range.17 18 To test this, this patch removes the immediate timer fire for testing19 and instead sets the earliest time to send values to both be 1 second.20 This will test that the proper timer gets set to send both reports.21 22 * NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp:23 (WebKit::PCM::Database::attributePrivateClickMeasurement):24 * NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.h:25 * NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManager.cpp:26 (WebKit::PrivateClickMeasurementManager::startTimer):27 (WebKit::PrivateClickMeasurementManager::attribute):28 (WebKit::PrivateClickMeasurementManager::randomlyBetweenFifteenAndThirtyMinutes const):29 (WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests):30 In the case of both times being past due to report, schedule one for31 15 - 30 minutes later.32 33 * NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManager.h:34 * NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementStore.cpp:35 (WebKit::PCM::Store::attributePrivateClickMeasurement):36 * NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementStore.h:37 38 1 2021-11-04 Russell Epstein <repstein@apple.com> 39 2
Note:
See TracChangeset
for help on using the changeset viewer.