Title: [272532] branches/safari-611-branch/Source/WebKit
Revision
272532
Author
[email protected]
Date
2021-02-08 13:03:43 -0800 (Mon, 08 Feb 2021)

Log Message

Cherry-pick r272346. rdar://problem/74105218

    PCM: earliestTimeToSend should be treated as an independent time value, not relative to timeOfAdClick
    https://bugs.webkit.org/show_bug.cgi?id=221303
    <rdar://problem/73902668>

    Reviewed by John Wilander.

    r270136 assumed that PCM's earliestTimeToSend attribute was the
    difference between timeOfAdClick and when the attribution should be
    sent. As a result, it began each new browser session by adjusting
    this value based on the amount of time the session was closed.
    In reality, earliestTimeToSend is a raw secondsSinceEpoch() value, so we don't
    need any adjustment after a new session.

    No new tests, this is covered by
    http/tests/privateClickMeasurement/expired-attribution-report-gets-sent-on-session-start.html
    now that the corresponding test SPI has been updated.

    * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
    (WebKit::createTableQueries):
    (WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore):
    (WebKit::ResourceLoadStatisticsDatabaseStore::createSchema):
    (WebKit::ResourceLoadStatisticsDatabaseStore::destroyStatements):
    (WebKit::ResourceLoadStatisticsDatabaseStore::markAttributedPrivateClickMeasurementsAsExpiredForTesting):
    Update the testing SPI to insert an expired time of now minus one
    hour as the earliestTimeToSend.

    (WebKit::ResourceLoadStatisticsDatabaseStore::updateTimerLastFired): Deleted.
    (WebKit::ResourceLoadStatisticsDatabaseStore::timerLastFired): Deleted.
    (WebKit::ResourceLoadStatisticsDatabaseStore::updatePrivateClickMeasurementAttributionTimes): Deleted.
    * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
    * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
    * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
    * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
    (WebKit::WebResourceLoadStatisticsStore::updateTimerLastFired): Deleted.
    * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
    * NetworkProcess/PrivateClickMeasurementManager.cpp:
    (WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests):
    (WebKit::PrivateClickMeasurementManager::updateTimerLastFired): Deleted.
    * NetworkProcess/PrivateClickMeasurementManager.h:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272346 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-611-branch/Source/WebKit/ChangeLog (272531 => 272532)


--- branches/safari-611-branch/Source/WebKit/ChangeLog	2021-02-08 21:03:39 UTC (rev 272531)
+++ branches/safari-611-branch/Source/WebKit/ChangeLog	2021-02-08 21:03:43 UTC (rev 272532)
@@ -1,5 +1,94 @@
 2021-02-08  Russell Epstein  <[email protected]>
 
+        Cherry-pick r272346. rdar://problem/74105218
+
+    PCM: earliestTimeToSend should be treated as an independent time value, not relative to timeOfAdClick
+    https://bugs.webkit.org/show_bug.cgi?id=221303
+    <rdar://problem/73902668>
+    
+    Reviewed by John Wilander.
+    
+    r270136 assumed that PCM's earliestTimeToSend attribute was the
+    difference between timeOfAdClick and when the attribution should be
+    sent. As a result, it began each new browser session by adjusting
+    this value based on the amount of time the session was closed.
+    In reality, earliestTimeToSend is a raw secondsSinceEpoch() value, so we don't
+    need any adjustment after a new session.
+    
+    No new tests, this is covered by
+    http/tests/privateClickMeasurement/expired-attribution-report-gets-sent-on-session-start.html
+    now that the corresponding test SPI has been updated.
+    
+    * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
+    (WebKit::createTableQueries):
+    (WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore):
+    (WebKit::ResourceLoadStatisticsDatabaseStore::createSchema):
+    (WebKit::ResourceLoadStatisticsDatabaseStore::destroyStatements):
+    (WebKit::ResourceLoadStatisticsDatabaseStore::markAttributedPrivateClickMeasurementsAsExpiredForTesting):
+    Update the testing SPI to insert an expired time of now minus one
+    hour as the earliestTimeToSend.
+    
+    (WebKit::ResourceLoadStatisticsDatabaseStore::updateTimerLastFired): Deleted.
+    (WebKit::ResourceLoadStatisticsDatabaseStore::timerLastFired): Deleted.
+    (WebKit::ResourceLoadStatisticsDatabaseStore::updatePrivateClickMeasurementAttributionTimes): Deleted.
+    * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
+    * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
+    * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
+    * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
+    (WebKit::WebResourceLoadStatisticsStore::updateTimerLastFired): Deleted.
+    * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
+    * NetworkProcess/PrivateClickMeasurementManager.cpp:
+    (WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests):
+    (WebKit::PrivateClickMeasurementManager::updateTimerLastFired): Deleted.
+    * NetworkProcess/PrivateClickMeasurementManager.h:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-02-03  Kate Cheney  <[email protected]>
+
+            PCM: earliestTimeToSend should be treated as an independent time value, not relative to timeOfAdClick
+            https://bugs.webkit.org/show_bug.cgi?id=221303
+            <rdar://problem/73902668>
+
+            Reviewed by John Wilander.
+
+            r270136 assumed that PCM's earliestTimeToSend attribute was the
+            difference between timeOfAdClick and when the attribution should be
+            sent. As a result, it began each new browser session by adjusting
+            this value based on the amount of time the session was closed.
+            In reality, earliestTimeToSend is a raw secondsSinceEpoch() value, so we don't
+            need any adjustment after a new session.
+
+            No new tests, this is covered by
+            http/tests/privateClickMeasurement/expired-attribution-report-gets-sent-on-session-start.html
+            now that the corresponding test SPI has been updated.
+
+            * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
+            (WebKit::createTableQueries):
+            (WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore):
+            (WebKit::ResourceLoadStatisticsDatabaseStore::createSchema):
+            (WebKit::ResourceLoadStatisticsDatabaseStore::destroyStatements):
+            (WebKit::ResourceLoadStatisticsDatabaseStore::markAttributedPrivateClickMeasurementsAsExpiredForTesting):
+            Update the testing SPI to insert an expired time of now minus one
+            hour as the earliestTimeToSend.
+
+            (WebKit::ResourceLoadStatisticsDatabaseStore::updateTimerLastFired): Deleted.
+            (WebKit::ResourceLoadStatisticsDatabaseStore::timerLastFired): Deleted.
+            (WebKit::ResourceLoadStatisticsDatabaseStore::updatePrivateClickMeasurementAttributionTimes): Deleted.
+            * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
+            * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
+            * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
+            * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
+            (WebKit::WebResourceLoadStatisticsStore::updateTimerLastFired): Deleted.
+            * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
+            * NetworkProcess/PrivateClickMeasurementManager.cpp:
+            (WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests):
+            (WebKit::PrivateClickMeasurementManager::updateTimerLastFired): Deleted.
+            * NetworkProcess/PrivateClickMeasurementManager.h:
+
+2021-02-08  Russell Epstein  <[email protected]>
+
         Cherry-pick r272335. rdar://problem/74032694
 
     REGRESSION (r270392): Launch time regression under IOSurface::maximumSize()

Modified: branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp (272531 => 272532)


--- branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp	2021-02-08 21:03:39 UTC (rev 272531)
+++ branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp	2021-02-08 21:03:43 UTC (rev 272532)
@@ -85,7 +85,6 @@
     "sourceID, timeOfAdClick) VALUES (?, ?, ?, ?)"_s;
 constexpr auto insertAttributedPrivateClickMeasurementQuery = "INSERT OR REPLACE INTO AttributedPrivateClickMeasurement (sourceSiteDomainID, attributeOnSiteDomainID, "
     "sourceID, attributionTriggerData, priority, timeOfAdClick, earliestTimeToSend) VALUES (?, ?, ?, ?, ?, ?, ?)"_s;
-constexpr auto updateTimerLastFiredQuery = "INSERT OR REPLACE INTO TimerLastFired (key, timeLastFiredSeconds) VALUES (1, ?)"_s;
 
 // INSERT OR REPLACE Queries
 constexpr auto subframeUnderTopFrameDomainsQuery = "INSERT OR REPLACE into SubframeUnderTopFrameDomains (subFrameDomainID, lastUpdated, topFrameDomainID) SELECT ?, ?, domainID FROM ObservedDomains where registrableDomain in ( "_s;
@@ -143,7 +142,6 @@
 constexpr auto allAttributedPrivateClickMeasurementQuery = "SELECT * FROM AttributedPrivateClickMeasurement"_s;
 constexpr auto findUnattributedQuery = "SELECT * FROM UnattributedPrivateClickMeasurement WHERE sourceSiteDomainID = ? AND attributeOnSiteDomainID = ?"_s;
 constexpr auto findAttributedQuery = "SELECT * FROM AttributedPrivateClickMeasurement WHERE sourceSiteDomainID = ? AND attributeOnSiteDomainID = ?"_s;
-constexpr auto timerLastFiredQuery = "SELECT timeLastFiredSeconds FROM TimerLastFired WHERE key = 1"_s;
 
 // EXISTS for testing queries
 constexpr auto linkDecorationExistsQuery = "SELECT EXISTS (SELECT * FROM TopFrameLinkDecorationsFrom WHERE toDomainID = ? OR fromDomainID = ?)"_s;
@@ -250,9 +248,6 @@
     "FOREIGN KEY(sourceSiteDomainID) REFERENCES ObservedDomains(domainID) ON DELETE CASCADE, "
     "FOREIGN KEY(attributeOnSiteDomainID) REFERENCES ObservedDomains(domainID) ON DELETE CASCADE);"_s;
 
-constexpr auto createTimerLastFired = "CREATE TABLE TimerLastFired ( key INTEGER PRIMARY KEY, "
-    " timeLastFiredSeconds REAL NOT NULL )"_s;
-
 // CREATE UNIQUE INDEX Queries.
 constexpr auto createUniqueIndexStorageAccessUnderTopFrameDomains = "CREATE UNIQUE INDEX IF NOT EXISTS StorageAccessUnderTopFrameDomains_domainID_topLevelDomainID on StorageAccessUnderTopFrameDomains ( domainID, topLevelDomainID );"_s;
 constexpr auto createUniqueIndexTopFrameUniqueRedirectsTo = "CREATE UNIQUE INDEX IF NOT EXISTS TopFrameUniqueRedirectsTo_sourceDomainID_toDomainID on TopFrameUniqueRedirectsTo ( sourceDomainID, toDomainID );"_s;
@@ -300,8 +295,7 @@
         { "SubresourceUniqueRedirectsFrom"_s, createSubresourceUniqueRedirectsFrom},
         { "OperatingDates"_s, createOperatingDates},
         { "UnattributedPrivateClickMeasurement"_s, createUnattributedPrivateClickMeasurement},
-        { "AttributedPrivateClickMeasurement"_s, createAttributedPrivateClickMeasurement},
-        { "TimerLastFired"_s, createTimerLastFired}
+        { "AttributedPrivateClickMeasurement"_s, createAttributedPrivateClickMeasurement}
     });
     
     return createTableQueries;
@@ -332,7 +326,6 @@
         RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::turnOnIncrementalAutoVacuum failed, error message: %" PUBLIC_LOG_STRING, this, m_database.lastErrorMsg());
 
     includeTodayAsOperatingDateIfNecessary();
-    updatePrivateClickMeasurementAttributionTimes();
     allStores().add(this);
 }
 
@@ -681,11 +674,6 @@
         LOG_ERROR("Could not create AttributedPrivateClickMeasurement table in database (%i) - %s", m_database.lastError(), m_database.lastErrorMsg());
         return false;
     }
-    
-    if (!m_database.executeCommand(createTimerLastFired)) {
-        LOG_ERROR("Could not create TimerLastFired table in database (%i) - %s", m_database.lastError(), m_database.lastErrorMsg());
-        return false;
-    }
 
     if (!createUniqueIndices())
         return false;
@@ -744,8 +732,6 @@
     m_allAttributedPrivateClickMeasurementStatement = nullptr;
     m_findUnattributedStatement = nullptr;
     m_findAttributedStatement = nullptr;
-    m_updateTimerLastFiredStatement = nullptr;
-    m_timerLastFiredStatement = nullptr;
     m_updateAttributionsEarliestTimeToSendStatement = nullptr;
     m_removeUnattributedStatement = nullptr;
 }
@@ -2890,54 +2876,6 @@
     }
 }
 
-void ResourceLoadStatisticsDatabaseStore::updateTimerLastFired()
-{
-    auto scopedStatement = this->scopedStatement(m_updateTimerLastFiredStatement, updateTimerLastFiredQuery, "updateTimerLastFired"_s);
-
-    auto now = WallTime::now().secondsSinceEpoch().value();
-
-    if (!scopedStatement
-        || scopedStatement->bindDouble(1, now) != SQLITE_OK
-        || scopedStatement->step() != SQLITE_DONE) {
-        RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::updateTimerLastFired failed, error message: %{private}s", this, m_database.lastErrorMsg());
-        ASSERT_NOT_REACHED();
-    }
-}
-
-WallTime ResourceLoadStatisticsDatabaseStore::timerLastFired()
-{
-    auto scopedStatement = this->scopedStatement(m_timerLastFiredStatement, timerLastFiredQuery, "timerLastFired"_s);
-
-    if (!scopedStatement) {
-        RELEASE_LOG_ERROR_IF_ALLOWED(m_sessionID, "%p - ResourceLoadStatisticsDatabaseStore::timerLastFired, error message: %{private}s", this, m_database.lastErrorMsg());
-        ASSERT_NOT_REACHED();
-    }
-
-    if (scopedStatement->step() == SQLITE_ROW)
-        return WallTime::fromRawSeconds(scopedStatement->getColumnDouble(0));
-    
-    return WallTime::now();
-}
-
-void ResourceLoadStatisticsDatabaseStore::updatePrivateClickMeasurementAttributionTimes()
-{
-    // We should update attributions on session-start to account for the time
-    // that passed while the session was closed. If the amount of time since the last
-    // timer fire is greater than the earliestTimeToSend, we should set earliestTimeToSend
-    // to be immediately.
-    auto lastFired = timerLastFired();
-    auto timePassed = WallTime::now() - lastFired;
-
-    auto scopedStatement = this->scopedStatement(m_updateAttributionsEarliestTimeToSendStatement, updateAttributionsEarliestTimeToSendQuery, "updatePrivateClickMeasurementAttributionTimes"_s);
-
-    if (!scopedStatement
-        || scopedStatement->bindDouble(1, timePassed.value()) != SQLITE_OK
-        || scopedStatement->step() != SQLITE_DONE) {
-        RELEASE_LOG_ERROR_IF_ALLOWED(m_sessionID, "%p - ResourceLoadStatisticsDatabaseStore::updatePrivateClickMeasurementAttributionTimes, error message: %{private}s", this, m_database.lastErrorMsg());
-        ASSERT_NOT_REACHED();
-    }
-}
-
 PrivateClickMeasurement ResourceLoadStatisticsDatabaseStore::buildPrivateClickMeasurementFromDatabase(WebCore::SQLiteStatement* statement, PrivateClickMeasurementAttributionType attributionType)
 {
     auto sourceSiteDomain = getDomainStringFromDomainID(statement->getColumnInt(0));
@@ -3315,21 +3253,11 @@
 
 void ResourceLoadStatisticsDatabaseStore::markAttributedPrivateClickMeasurementsAsExpiredForTesting()
 {
-    // Update the last timer fired time to be one day ago.
-    auto yesterday = (WallTime::now() - 24_h).secondsSinceEpoch().value();
-    auto scopedStatement = this->scopedStatement(m_updateTimerLastFiredStatement, updateTimerLastFiredQuery, "insertExpiredAttributionTesting"_s);
-    if (!scopedStatement
-        || scopedStatement->bindDouble(1, yesterday) != SQLITE_OK
-        || scopedStatement->step() != SQLITE_DONE) {
-        RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::insertExpiredAttributionTesting failed, error message: %{private}s", this, m_database.lastErrorMsg());
-        ASSERT_NOT_REACHED();
-    }
-
-    auto expiredTimeToSend = 1_h; // Must be less than 1 day.
+    auto expiredTimeToSend = WallTime::now() - 1_h;
     
     auto statement = SQLiteStatement(m_database, "UPDATE AttributedPrivateClickMeasurement SET earliestTimeToSend = ?");
     if (statement.prepare() != SQLITE_OK
-        || statement.bindInt(1, expiredTimeToSend.value()) != SQLITE_OK
+        || statement.bindInt(1, expiredTimeToSend.secondsSinceEpoch().value()) != SQLITE_OK
         || statement.step() != SQLITE_DONE) {
         RELEASE_LOG_ERROR_IF_ALLOWED(m_sessionID, "%p - ResourceLoadStatisticsDatabaseStore::insertPrivateClickMeasurement, error message: %{private}s", this, m_database.lastErrorMsg());
         ASSERT_NOT_REACHED();

Modified: branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h (272531 => 272532)


--- branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h	2021-02-08 21:03:39 UTC (rev 272531)
+++ branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h	2021-02-08 21:03:43 UTC (rev 272532)
@@ -140,9 +140,7 @@
     void clearExpiredPrivateClickMeasurement() override;
     String privateClickMeasurementToString() override;
     void clearSentAttributions(Vector<WebCore::PrivateClickMeasurement>&&) override;
-    void updateTimerLastFired() override;
     void markAttributedPrivateClickMeasurementsAsExpiredForTesting() override;
-    void updatePrivateClickMeasurementAttributionTimes();
 
 private:
     void includeTodayAsOperatingDateIfNecessary() override;
@@ -237,7 +235,6 @@
     WebCore::PrivateClickMeasurement buildPrivateClickMeasurementFromDatabase(WebCore::SQLiteStatement*, PrivateClickMeasurementAttributionType);
     String attributionToString(WebCore::SQLiteStatement*, PrivateClickMeasurementAttributionType);
     std::pair<Optional<UnattributedPrivateClickMeasurement>, Optional<AttributedPrivateClickMeasurement>> findPrivateClickMeasurement(const WebCore::PrivateClickMeasurement::SourceSite&, const WebCore::PrivateClickMeasurement::AttributeOnSite&);
-    WallTime timerLastFired();
 
     const String m_storageDirectoryPath;
     mutable WebCore::SQLiteDatabase m_database;
@@ -288,8 +285,6 @@
     std::unique_ptr<WebCore::SQLiteStatement> m_allAttributedPrivateClickMeasurementStatement;
     std::unique_ptr<WebCore::SQLiteStatement> m_findUnattributedStatement;
     std::unique_ptr<WebCore::SQLiteStatement> m_findAttributedStatement;
-    std::unique_ptr<WebCore::SQLiteStatement> m_updateTimerLastFiredStatement;
-    std::unique_ptr<WebCore::SQLiteStatement> m_timerLastFiredStatement;
     std::unique_ptr<WebCore::SQLiteStatement> m_updateAttributionsEarliestTimeToSendStatement;
     std::unique_ptr<WebCore::SQLiteStatement> m_removeUnattributedStatement;
     

Modified: branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h (272531 => 272532)


--- branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h	2021-02-08 21:03:39 UTC (rev 272531)
+++ branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h	2021-02-08 21:03:43 UTC (rev 272532)
@@ -118,7 +118,6 @@
     String privateClickMeasurementToString() override { return String(); };
     void clearSentAttributions(Vector<WebCore::PrivateClickMeasurement>&&) override { };
     void markAttributedPrivateClickMeasurementsAsExpiredForTesting() override { };
-    void updateTimerLastFired() override { };
 
 private:
     void includeTodayAsOperatingDateIfNecessary() override;

Modified: branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h (272531 => 272532)


--- branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h	2021-02-08 21:03:39 UTC (rev 272531)
+++ branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h	2021-02-08 21:03:43 UTC (rev 272532)
@@ -213,7 +213,6 @@
     virtual String privateClickMeasurementToString() = 0;
     virtual void clearSentAttributions(Vector<WebCore::PrivateClickMeasurement>&&) = 0;
     virtual void markAttributedPrivateClickMeasurementsAsExpiredForTesting() = 0;
-    virtual void updateTimerLastFired() = 0;
 
 protected:
     static unsigned computeImportance(const WebCore::ResourceLoadStatistics&);

Modified: branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp (272531 => 272532)


--- branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp	2021-02-08 21:03:39 UTC (rev 272531)
+++ branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp	2021-02-08 21:03:43 UTC (rev 272532)
@@ -1475,21 +1475,6 @@
     });
 }
 
-void WebResourceLoadStatisticsStore::updateTimerLastFired()
-{
-    ASSERT(RunLoop::isMain());
-
-    if (isEphemeral())
-        return;
-
-    postTask([this]() mutable {
-        if (!m_statisticsStore)
-            return;
-
-        m_statisticsStore->updateTimerLastFired();
-    });
-}
-
 void WebResourceLoadStatisticsStore::insertPrivateClickMeasurement(PrivateClickMeasurement&& attribution, PrivateClickMeasurementAttributionType attributionType)
 {
     ASSERT(RunLoop::isMain());

Modified: branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h (272531 => 272532)


--- branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h	2021-02-08 21:03:39 UTC (rev 272531)
+++ branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h	2021-02-08 21:03:43 UTC (rev 272532)
@@ -316,7 +316,6 @@
     void clearExpiredPrivateClickMeasurement();
     void privateClickMeasurementToString(CompletionHandler<void(String)>&&);
     void clearSentAttributions(Vector<WebCore::PrivateClickMeasurement>&&);
-    void updateTimerLastFired();
     void markAttributedPrivateClickMeasurementsAsExpiredForTesting(CompletionHandler<void()>&&);
 
 private:

Modified: branches/safari-611-branch/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.cpp (272531 => 272532)


--- branches/safari-611-branch/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.cpp	2021-02-08 21:03:39 UTC (rev 272531)
+++ branches/safari-611-branch/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.cpp	2021-02-08 21:03:43 UTC (rev 272532)
@@ -188,17 +188,6 @@
 #endif
 }
 
-void PrivateClickMeasurementManager::updateTimerLastFired()
-{
-#if ENABLE(RESOURCE_LOAD_STATISTICS)
-    if (!featureEnabled())
-        return;
-
-    if (auto* resourceLoadStatistics = m_networkSession->resourceLoadStatistics())
-        resourceLoadStatistics->updateTimerLastFired();
-#endif
-}
-
 void PrivateClickMeasurementManager::firePendingAttributionRequests()
 {
 #if ENABLE(RESOURCE_LOAD_STATISTICS)
@@ -232,7 +221,6 @@
         }
         
         clearSentAttributions(WTFMove(sentAttributions));
-        updateTimerLastFired();
 
         if (nextTimeToFire < Seconds::infinity())
             startTimer(nextTimeToFire);

Modified: branches/safari-611-branch/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.h (272531 => 272532)


--- branches/safari-611-branch/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.h	2021-02-08 21:03:39 UTC (rev 272531)
+++ branches/safari-611-branch/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.h	2021-02-08 21:03:43 UTC (rev 272532)
@@ -74,7 +74,6 @@
     void clearExpired();
     bool featureEnabled() const;
     bool debugModeEnabled() const;
-    void updateTimerLastFired();
 
     WebCore::Timer m_firePendingAttributionRequestsTimer;
     bool m_isRunningTest { false };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to