Changeset 285327 in webkit


Ignore:
Timestamp:
Nov 4, 2021, 7:45:31 PM (4 years ago)
Author:
Russell Epstein
Message:

Revert "Apply patch. rdar://problem/80991209"

This reverts commit r285313.

Location:
branches/safari-612-branch/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-612-branch/Source/WebCore/ChangeLog

    r285325 r285327  
    213213            * svg/SVGGraphicsElement.cpp:
    214214            (WebCore::SVGGraphicsElement::animatedLocalTransform const):
    215 
    216 2021-11-04  Russell Epstein  <repstein@apple.com>
    217 
    218         Apply patch. rdar://problem/80991209
    219 
    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 Measurement
    223             https://bugs.webkit.org/show_bug.cgi?id=228104
    224             <rdar://problem/80991209>
    225 
    226             Reviewed by John Wilander.
    227 
    228             No new tests. Several existing tests would timeout with the removal of
    229             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:
    236215
    2372162021-11-04  Russell Epstein  <repstein@apple.com>
  • branches/safari-612-branch/Source/WebCore/loader/PrivateClickMeasurement.cpp

    r285313 r285327  
    149149}
    150150
    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)
     151static Seconds randomlyBetweenTwentyFourAndFortyEightHours()
     152{
     153    return 24_h + Seconds(randomNumber() * (24_h).value());
     154}
     155
     156PrivateClickMeasurement::AttributionSecondsUntilSendData PrivateClickMeasurement::attributeAndGetEarliestTimeToSend(AttributionTriggerData&& attributionTriggerData)
    157157{
    158158    if (!attributionTriggerData.isValid() || (m_attributionTriggerData && m_attributionTriggerData->priority >= attributionTriggerData.priority))
     
    162162    // 24-48 hour delay before sending. This helps privacy since the conversion and the attribution
    163163    // 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();
    166166    m_timesToSend = { WallTime::now() + sourceSecondsUntilSend, WallTime::now() + destinationSecondsUntilSend };
    167167
  • branches/safari-612-branch/Source/WebCore/loader/PrivateClickMeasurement.h

    r285313 r285327  
    5656    enum class PcmDataCarried : bool { NonPersonallyIdentifiable, PersonallyIdentifiable };
    5757    enum class AttributionReportEndpoint : bool { Source, Destination };
    58     enum class IsRunningLayoutTest : bool { No, Yes };
    5958
    6059    struct SourceID {
     
    328327    WEBCORE_EXPORT static const Seconds maxAge();
    329328    WEBCORE_EXPORT static Expected<AttributionTriggerData, String> parseAttributionRequest(const URL& redirectURL);
    330     WEBCORE_EXPORT AttributionSecondsUntilSendData attributeAndGetEarliestTimeToSend(AttributionTriggerData&&, IsRunningLayoutTest);
     329    WEBCORE_EXPORT AttributionSecondsUntilSendData attributeAndGetEarliestTimeToSend(AttributionTriggerData&&);
    331330    WEBCORE_EXPORT bool hasHigherPriorityThan(const PrivateClickMeasurement&) const;
    332331    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/80991209
    4 
    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 Measurement
    8             https://bugs.webkit.org/show_bug.cgi?id=228104
    9             <rdar://problem/80991209>
    10 
    11             Reviewed by John Wilander.
    12 
    13             firePendingAttributionRequests() was sometimes scheduling the next timer
    14             fire to be the raw time value instead of the difference between now
    15             and the scheduled send time. This was resulting in some reports not being
    16             sent within the 24-48 hour range.
    17 
    18             To test this, this patch removes the immediate timer fire for testing
    19             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 for
    31             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 
    3812021-11-04  Russell Epstein  <repstein@apple.com>
    392
Note: See TracChangeset for help on using the changeset viewer.