⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243723 in webkit


Ignore:
Timestamp:
Apr 1, 2019, 4:54:14 PM (7 years ago)
Author:
Alan Coon
Message:

Cherry-pick r243671. rdar://problem/47859936

Move WebResourceLoadStatisticsStore IPC calls from the UI process to the network process
https://bugs.webkit.org/show_bug.cgi?id=196407
<rdar://problem/47859936>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture.html

This patch removes old code for the batching into "statistics updated" calls.
Since the move of Resource Load Statistics to the network process, all such
collection is done directly through dedicated calls to the network process.

The remaining functionality was renamed to make it more clear, i.e.
ResourceLoadObserver::notifyObserver() renamed to
ResourceLoadObserver::updateCentralStatisticsStore().

  • loader/ResourceLoadObserver.cpp: (WebCore::ResourceLoadObserver::setStatisticsUpdatedCallback): (WebCore::ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback): (WebCore::ResourceLoadObserver::logSubresourceLoading): (WebCore::ResourceLoadObserver::logWebSocketLoading): (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution): (WebCore::ResourceLoadObserver::requestStorageAccessUnderOpener): (WebCore::ResourceLoadObserver::updateCentralStatisticsStore): (WebCore::ResourceLoadObserver::clearState): (WebCore::ResourceLoadObserver::setNotificationCallback): Deleted. (WebCore::ResourceLoadObserver::ResourceLoadObserver): Deleted. (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded): Deleted. (WebCore::ResourceLoadObserver::notifyObserver): Deleted.
  • loader/ResourceLoadObserver.h:
  • testing/Internals.cpp: (WebCore::Internals::notifyResourceLoadObserver):

Source/WebKit:

The two WebResourceLoadStatisticsStore IPC endpoints were left behind when we
moved Resource Load Statistics from the UI process to the network process. One
of the endpoints is the message RequestStorageAccessUnderOpener which underpins
our compatibility fix for federated logins using popups. This patch redirects
these IPC calls to the network process and cleans up some assumptions around
them.

  • CMakeLists.txt:

Removed the old IPC receiver.

  • DerivedSources.make:

Removed the old IPC receiver.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: (WebKit::WebResourceLoadStatisticsStore::requestUpdate): Deleted.

This is no longer needed since there is a dedicated update mechanism
that actually sends the update.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated): (WebKit::NetworkConnectionToWebProcess::requestStorageAccessUnderOpener):

Two new IPC receivers to pipe the calls to the network process.

(WebKit::NetworkConnectionToWebProcess::requestResourceLoadStatisticsUpdate): Deleted.

NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated now serves
this purpose.

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • UIProcess/WebResourceLoadStatisticsStore.messages.in: Removed.

Removed the old IPC receiver.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleResourceLoadStatisticsNotifyObserver):

Function name update.

  • WebProcess/WebProcess.cpp:

Now calls IPC to the network process instead of the UI process.

LayoutTests:

  • http/tests/storageAccess/deny-storage-access-under-opener-expected.txt:
  • http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-expected.txt:
  • http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-expected.txt: Added.
  • http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture.html: Added.
  • http/tests/storageAccess/resources/get-cookies.php:
  • http/tests/storageAccess/resources/produce-user-gesture-set-cookie-and-report-back.html: Added.

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

Location:
tags/Safari-608.1.13.4
Files:
3 added
1 deleted
20 edited

Legend:

Unmodified
Added
Removed
  • tags/Safari-608.1.13.4/LayoutTests/ChangeLog

    r243383 r243723  
     12019-04-01  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r243671. rdar://problem/47859936
     4
     5    Move WebResourceLoadStatisticsStore IPC calls from the UI process to the network process
     6    https://bugs.webkit.org/show_bug.cgi?id=196407
     7    <rdar://problem/47859936>
     8   
     9    Reviewed by Brent Fulgham.
     10   
     11    Source/WebCore:
     12   
     13    Test: http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture.html
     14   
     15    This patch removes old code for the batching into "statistics updated" calls.
     16    Since the move of Resource Load Statistics to the network process, all such
     17    collection is done directly through dedicated calls to the network process.
     18   
     19    The remaining functionality was renamed to make it more clear, i.e.
     20    ResourceLoadObserver::notifyObserver() renamed to
     21    ResourceLoadObserver::updateCentralStatisticsStore().
     22   
     23    * loader/ResourceLoadObserver.cpp:
     24    (WebCore::ResourceLoadObserver::setStatisticsUpdatedCallback):
     25    (WebCore::ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback):
     26    (WebCore::ResourceLoadObserver::logSubresourceLoading):
     27    (WebCore::ResourceLoadObserver::logWebSocketLoading):
     28    (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
     29    (WebCore::ResourceLoadObserver::requestStorageAccessUnderOpener):
     30    (WebCore::ResourceLoadObserver::updateCentralStatisticsStore):
     31    (WebCore::ResourceLoadObserver::clearState):
     32    (WebCore::ResourceLoadObserver::setNotificationCallback): Deleted.
     33    (WebCore::ResourceLoadObserver::ResourceLoadObserver): Deleted.
     34    (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded): Deleted.
     35    (WebCore::ResourceLoadObserver::notifyObserver): Deleted.
     36    * loader/ResourceLoadObserver.h:
     37    * testing/Internals.cpp:
     38    (WebCore::Internals::notifyResourceLoadObserver):
     39   
     40    Source/WebKit:
     41   
     42    The two WebResourceLoadStatisticsStore IPC endpoints were left behind when we
     43    moved Resource Load Statistics from the UI process to the network process. One
     44    of the endpoints is the message RequestStorageAccessUnderOpener which underpins
     45    our compatibility fix for federated logins using popups. This patch redirects
     46    these IPC calls to the network process and cleans up some assumptions around
     47    them.
     48   
     49    * CMakeLists.txt:
     50        Removed the old IPC receiver.
     51    * DerivedSources.make:
     52        Removed the old IPC receiver.
     53    * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
     54    (WebKit::WebResourceLoadStatisticsStore::requestUpdate): Deleted.
     55        This is no longer needed since there is a dedicated update mechanism
     56        that actually sends the update.
     57    * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
     58    * NetworkProcess/NetworkConnectionToWebProcess.cpp:
     59    (WebKit::NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated):
     60    (WebKit::NetworkConnectionToWebProcess::requestStorageAccessUnderOpener):
     61        Two new IPC receivers to pipe the calls to the network process.
     62    (WebKit::NetworkConnectionToWebProcess::requestResourceLoadStatisticsUpdate): Deleted.
     63        NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated now serves
     64        this purpose.
     65    * NetworkProcess/NetworkConnectionToWebProcess.h:
     66    * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
     67    * UIProcess/WebResourceLoadStatisticsStore.messages.in: Removed.
     68        Removed the old IPC receiver.
     69    * UIProcess/WebsiteData/WebsiteDataStore.cpp:
     70    * WebKit.xcodeproj/project.pbxproj:
     71    * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     72    (WKBundleResourceLoadStatisticsNotifyObserver):
     73        Function name update.
     74    * WebProcess/WebProcess.cpp:
     75        Now calls IPC to the network process instead of the UI process.
     76   
     77    LayoutTests:
     78   
     79    * http/tests/storageAccess/deny-storage-access-under-opener-expected.txt:
     80    * http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-expected.txt:
     81    * http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-expected.txt: Added.
     82    * http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture.html: Added.
     83    * http/tests/storageAccess/resources/get-cookies.php:
     84    * http/tests/storageAccess/resources/produce-user-gesture-set-cookie-and-report-back.html: Added.
     85   
     86   
     87    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     88
     89    2019-03-29  John Wilander  <wilander@apple.com>
     90
     91            Move WebResourceLoadStatisticsStore IPC calls from the UI process to the network process
     92            https://bugs.webkit.org/show_bug.cgi?id=196407
     93            <rdar://problem/47859936>
     94
     95            Reviewed by Brent Fulgham.
     96
     97            * http/tests/storageAccess/deny-storage-access-under-opener-expected.txt:
     98            * http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-expected.txt:
     99            * http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-expected.txt: Added.
     100            * http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture.html: Added.
     101            * http/tests/storageAccess/resources/get-cookies.php:
     102            * http/tests/storageAccess/resources/produce-user-gesture-set-cookie-and-report-back.html: Added.
     103
    11042019-03-22  Ryan Haddad  <ryanhaddad@apple.com>
    2105
  • tags/Safari-608.1.13.4/LayoutTests/http/tests/storageAccess/deny-storage-access-under-opener-expected.txt

    r231450 r243723  
    1515Should not receive first-party cookie.
    1616Did not receive cookie named 'firstPartyCookie'.
    17 Did not receive cookie named ''.
    1817Client-side document.cookie:
  • tags/Safari-608.1.13.4/LayoutTests/http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-expected.txt

    r236563 r243723  
    1515Should not receive first-party cookie.
    1616Did not receive cookie named 'firstPartyCookie'.
    17 Did not receive cookie named ''.
    1817Client-side document.cookie:
  • tags/Safari-608.1.13.4/LayoutTests/http/tests/storageAccess/resources/get-cookies.php

    r235569 r243723  
    66    echo "Received cookie named '" . $_GET["name1"] . "'.<br>";
    77}
    8 if(!isset($_COOKIE[$_GET["name2"]])) {
    9     echo "Did not receive cookie named '" . $_GET["name2"] . "'.<br>";
    10 } else {
    11     echo "Received cookie named '" . $_GET["name2"] . "'.<br>";
     8if(!empty($_GET["name2"])) {
     9    if(!isset($_COOKIE[$_GET["name2"]])) {
     10        echo "Did not receive cookie named '" . $_GET["name2"] . "'.<br>";
     11    } else {
     12        echo "Received cookie named '" . $_GET["name2"] . "'.<br>";
     13    }
    1214}
    1315if(!empty($_GET["name3"])) {
  • tags/Safari-608.1.13.4/Source/WebCore/ChangeLog

    r243383 r243723  
     12019-04-01  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r243671. rdar://problem/47859936
     4
     5    Move WebResourceLoadStatisticsStore IPC calls from the UI process to the network process
     6    https://bugs.webkit.org/show_bug.cgi?id=196407
     7    <rdar://problem/47859936>
     8   
     9    Reviewed by Brent Fulgham.
     10   
     11    Source/WebCore:
     12   
     13    Test: http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture.html
     14   
     15    This patch removes old code for the batching into "statistics updated" calls.
     16    Since the move of Resource Load Statistics to the network process, all such
     17    collection is done directly through dedicated calls to the network process.
     18   
     19    The remaining functionality was renamed to make it more clear, i.e.
     20    ResourceLoadObserver::notifyObserver() renamed to
     21    ResourceLoadObserver::updateCentralStatisticsStore().
     22   
     23    * loader/ResourceLoadObserver.cpp:
     24    (WebCore::ResourceLoadObserver::setStatisticsUpdatedCallback):
     25    (WebCore::ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback):
     26    (WebCore::ResourceLoadObserver::logSubresourceLoading):
     27    (WebCore::ResourceLoadObserver::logWebSocketLoading):
     28    (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
     29    (WebCore::ResourceLoadObserver::requestStorageAccessUnderOpener):
     30    (WebCore::ResourceLoadObserver::updateCentralStatisticsStore):
     31    (WebCore::ResourceLoadObserver::clearState):
     32    (WebCore::ResourceLoadObserver::setNotificationCallback): Deleted.
     33    (WebCore::ResourceLoadObserver::ResourceLoadObserver): Deleted.
     34    (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded): Deleted.
     35    (WebCore::ResourceLoadObserver::notifyObserver): Deleted.
     36    * loader/ResourceLoadObserver.h:
     37    * testing/Internals.cpp:
     38    (WebCore::Internals::notifyResourceLoadObserver):
     39   
     40    Source/WebKit:
     41   
     42    The two WebResourceLoadStatisticsStore IPC endpoints were left behind when we
     43    moved Resource Load Statistics from the UI process to the network process. One
     44    of the endpoints is the message RequestStorageAccessUnderOpener which underpins
     45    our compatibility fix for federated logins using popups. This patch redirects
     46    these IPC calls to the network process and cleans up some assumptions around
     47    them.
     48   
     49    * CMakeLists.txt:
     50        Removed the old IPC receiver.
     51    * DerivedSources.make:
     52        Removed the old IPC receiver.
     53    * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
     54    (WebKit::WebResourceLoadStatisticsStore::requestUpdate): Deleted.
     55        This is no longer needed since there is a dedicated update mechanism
     56        that actually sends the update.
     57    * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
     58    * NetworkProcess/NetworkConnectionToWebProcess.cpp:
     59    (WebKit::NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated):
     60    (WebKit::NetworkConnectionToWebProcess::requestStorageAccessUnderOpener):
     61        Two new IPC receivers to pipe the calls to the network process.
     62    (WebKit::NetworkConnectionToWebProcess::requestResourceLoadStatisticsUpdate): Deleted.
     63        NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated now serves
     64        this purpose.
     65    * NetworkProcess/NetworkConnectionToWebProcess.h:
     66    * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
     67    * UIProcess/WebResourceLoadStatisticsStore.messages.in: Removed.
     68        Removed the old IPC receiver.
     69    * UIProcess/WebsiteData/WebsiteDataStore.cpp:
     70    * WebKit.xcodeproj/project.pbxproj:
     71    * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     72    (WKBundleResourceLoadStatisticsNotifyObserver):
     73        Function name update.
     74    * WebProcess/WebProcess.cpp:
     75        Now calls IPC to the network process instead of the UI process.
     76   
     77    LayoutTests:
     78   
     79    * http/tests/storageAccess/deny-storage-access-under-opener-expected.txt:
     80    * http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-expected.txt:
     81    * http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-expected.txt: Added.
     82    * http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture.html: Added.
     83    * http/tests/storageAccess/resources/get-cookies.php:
     84    * http/tests/storageAccess/resources/produce-user-gesture-set-cookie-and-report-back.html: Added.
     85   
     86   
     87    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     88
     89    2019-03-29  John Wilander  <wilander@apple.com>
     90
     91            Move WebResourceLoadStatisticsStore IPC calls from the UI process to the network process
     92            https://bugs.webkit.org/show_bug.cgi?id=196407
     93            <rdar://problem/47859936>
     94
     95            Reviewed by Brent Fulgham.
     96
     97            Test: http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture.html
     98
     99            This patch removes old code for the batching into "statistics updated" calls.
     100            Since the move of Resource Load Statistics to the network process, all such
     101            collection is done directly through dedicated calls to the network process.
     102
     103            The remaining functionality was renamed to make it more clear, i.e.
     104            ResourceLoadObserver::notifyObserver() renamed to
     105            ResourceLoadObserver::updateCentralStatisticsStore().
     106
     107            * loader/ResourceLoadObserver.cpp:
     108            (WebCore::ResourceLoadObserver::setStatisticsUpdatedCallback):
     109            (WebCore::ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback):
     110            (WebCore::ResourceLoadObserver::logSubresourceLoading):
     111            (WebCore::ResourceLoadObserver::logWebSocketLoading):
     112            (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
     113            (WebCore::ResourceLoadObserver::requestStorageAccessUnderOpener):
     114            (WebCore::ResourceLoadObserver::updateCentralStatisticsStore):
     115            (WebCore::ResourceLoadObserver::clearState):
     116            (WebCore::ResourceLoadObserver::setNotificationCallback): Deleted.
     117            (WebCore::ResourceLoadObserver::ResourceLoadObserver): Deleted.
     118            (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded): Deleted.
     119            (WebCore::ResourceLoadObserver::notifyObserver): Deleted.
     120            * loader/ResourceLoadObserver.h:
     121            * testing/Internals.cpp:
     122            (WebCore::Internals::notifyResourceLoadObserver):
     123
    11242019-03-22  Ryan Haddad  <ryanhaddad@apple.com>
    2125
  • tags/Safari-608.1.13.4/Source/WebCore/loader/ResourceLoadObserver.cpp

    r242155 r243723  
    5454}
    5555
    56 void ResourceLoadObserver::setNotificationCallback(WTF::Function<void (Vector<ResourceLoadStatistics>&&)>&& notificationCallback)
     56void ResourceLoadObserver::setStatisticsUpdatedCallback(WTF::Function<void(Vector<ResourceLoadStatistics>&&)>&& notificationCallback)
    5757{
    5858    ASSERT(!m_notificationCallback);
     
    6060}
    6161
    62 void ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback(WTF::Function<void(const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, const RegistrableDomain& openerDomain)>&& callback)
     62void ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback(WTF::Function<void(PAL::SessionID sessionID, const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, const RegistrableDomain& openerDomain)>&& callback)
    6363{
    6464    ASSERT(!m_requestStorageAccessUnderOpenerCallback);
     
    9090}
    9191   
    92 ResourceLoadObserver::ResourceLoadObserver()
    93     : m_notificationTimer(*this, &ResourceLoadObserver::notifyObserver)
    94 {
    95 }
    96 
    9792static inline bool is3xxRedirect(const ResourceResponse& response)
    9893{
     
    134129        return;
    135130
    136     bool shouldCallNotificationCallback = false;
    137131    {
    138132        auto& targetStatistics = ensureResourceStatisticsForRegistrableDomain(targetDomain);
    139133        auto lastSeen = ResourceLoadStatistics::reduceTimeResolution(WallTime::now());
    140134        targetStatistics.lastSeen = lastSeen;
    141         if (targetStatistics.subresourceUnderTopFrameDomains.add(topFrameDomain).isNewEntry)
    142             shouldCallNotificationCallback = true;
     135        targetStatistics.subresourceUnderTopFrameDomains.add(topFrameDomain);
    143136
    144137        m_logSubresourceLoadingNotificationCallback(page->sessionID(), targetDomain, topFrameDomain, lastSeen);
     
    147140    if (isRedirect) {
    148141        auto& redirectingOriginStatistics = ensureResourceStatisticsForRegistrableDomain(redirectedFromDomain);
    149         bool isNewRedirectToEntry = redirectingOriginStatistics.subresourceUniqueRedirectsTo.add(targetDomain).isNewEntry;
     142        redirectingOriginStatistics.subresourceUniqueRedirectsTo.add(targetDomain);
    150143        auto& targetStatistics = ensureResourceStatisticsForRegistrableDomain(targetDomain);
    151         bool isNewRedirectFromEntry = targetStatistics.subresourceUniqueRedirectsFrom.add(redirectedFromDomain).isNewEntry;
    152 
    153         if (isNewRedirectToEntry || isNewRedirectFromEntry)
    154             shouldCallNotificationCallback = true;
     144        targetStatistics.subresourceUniqueRedirectsFrom.add(redirectedFromDomain);
    155145
    156146        m_logSubresourceRedirectNotificationCallback(page->sessionID(), redirectedFromDomain, targetDomain);
    157147    }
    158 
    159     if (shouldCallNotificationCallback)
    160         scheduleNotificationIfNeeded();
    161148}
    162149
     
    182169    auto& targetStatistics = ensureResourceStatisticsForRegistrableDomain(targetDomain);
    183170    targetStatistics.lastSeen = lastSeen;
    184     if (targetStatistics.subresourceUnderTopFrameDomains.add(topFrameDomain).isNewEntry)
    185         scheduleNotificationIfNeeded();
     171    targetStatistics.subresourceUnderTopFrameDomains.add(topFrameDomain);
    186172
    187173    m_logWebSocketLoadingNotificationCallback(sessionID, targetDomain, topFrameDomain, lastSeen);
     
    216202                if (auto* openerFrame = openerDocument->frame()) {
    217203                    if (auto openerPageID = openerFrame->loader().client().pageID())
    218                         requestStorageAccessUnderOpener(topFrameDomain, openerPageID.value(), *openerDocument);
     204                        requestStorageAccessUnderOpener(document.sessionID(), topFrameDomain, openerPageID.value(), *openerDocument);
    219205                }
    220206            }
     
    224210    m_logUserInteractionNotificationCallback(document.sessionID(), topFrameDomain);
    225211#endif
    226 
    227     m_notificationTimer.stop();
    228     notifyObserver();
    229212
    230213#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
     
    251234
    252235#if ENABLE(RESOURCE_LOAD_STATISTICS)
    253 void ResourceLoadObserver::requestStorageAccessUnderOpener(const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, Document& openerDocument)
     236void ResourceLoadObserver::requestStorageAccessUnderOpener(PAL::SessionID sessionID, const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, Document& openerDocument)
    254237{
    255238    auto openerUrl = openerDocument.url();
     
    258241        && !openerDocument.hasRequestedPageSpecificStorageAccessWithUserInteraction(domainInNeedOfStorageAccess)
    259242        && !equalIgnoringASCIICase(openerUrl.string(), WTF::blankURL())) {
    260         m_requestStorageAccessUnderOpenerCallback(domainInNeedOfStorageAccess, openerPageID, openerDomain);
     243        m_requestStorageAccessUnderOpenerCallback(sessionID, domainInNeedOfStorageAccess, openerPageID, openerDomain);
    261244        // Remember user interaction-based requests since they don't need to be repeated.
    262245        openerDocument.setHasRequestedPageSpecificStorageAccessWithUserInteraction(domainInNeedOfStorageAccess);
     
    383366}
    384367
    385 void ResourceLoadObserver::scheduleNotificationIfNeeded()
    386 {
    387     ASSERT(m_notificationCallback);
    388     if (m_resourceStatisticsMap.isEmpty()) {
    389         m_notificationTimer.stop();
    390         return;
    391     }
    392 
    393     if (!m_notificationTimer.isActive())
    394         m_notificationTimer.startOneShot(minimumNotificationInterval);
    395 }
    396 
    397 void ResourceLoadObserver::notifyObserver()
    398 {
    399     ASSERT(m_notificationCallback);
    400     m_notificationTimer.stop();
     368void ResourceLoadObserver::updateCentralStatisticsStore()
     369{
    401370    m_notificationCallback(takeStatistics());
    402371}
     
    425394void ResourceLoadObserver::clearState()
    426395{
    427     m_notificationTimer.stop();
    428396    m_resourceStatisticsMap.clear();
    429397    m_lastReportedUserInteractionMap.clear();
  • tags/Safari-608.1.13.4/Source/WebCore/loader/ResourceLoadObserver.h

    r242155 r243723  
    7373    WEBCORE_EXPORT String statisticsForURL(const URL&);
    7474
    75     WEBCORE_EXPORT void setNotificationCallback(WTF::Function<void (Vector<ResourceLoadStatistics>&&)>&&);
    76     WEBCORE_EXPORT void setRequestStorageAccessUnderOpenerCallback(Function<void(const RegistrableDomain&, uint64_t, const RegistrableDomain&)>&&);
     75    WEBCORE_EXPORT void setStatisticsUpdatedCallback(WTF::Function<void(Vector<ResourceLoadStatistics>&&)>&&);
     76    WEBCORE_EXPORT void setRequestStorageAccessUnderOpenerCallback(Function<void(PAL::SessionID, const RegistrableDomain&, uint64_t, const RegistrableDomain&)>&&);
    7777    WEBCORE_EXPORT void setLogUserInteractionNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&)>&&);
    7878    WEBCORE_EXPORT void setLogWebSocketLoadingNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)>&&);
     
    8080    WEBCORE_EXPORT void setLogSubresourceRedirectNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&)>&&);
    8181
    82     WEBCORE_EXPORT void notifyObserver();
     82    WEBCORE_EXPORT void updateCentralStatisticsStore();
    8383    WEBCORE_EXPORT void clearState();
    8484
     
    8989
    9090private:
    91     ResourceLoadObserver();
    92 
    9391    bool shouldLog(bool usesEphemeralSession) const;
    9492    ResourceLoadStatistics& ensureResourceStatisticsForRegistrableDomain(const RegistrableDomain&);
    9593
    96     void scheduleNotificationIfNeeded();
    9794    Vector<ResourceLoadStatistics> takeStatistics();
    9895
    9996#if ENABLE(RESOURCE_LOAD_STATISTICS)
    100     void requestStorageAccessUnderOpener(const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, Document& openerDocument);
     97    void requestStorageAccessUnderOpener(PAL::SessionID, const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, Document& openerDocument);
    10198#endif
    10299
     
    104101    HashMap<RegistrableDomain, WTF::WallTime> m_lastReportedUserInteractionMap;
    105102    Function<void(Vector<ResourceLoadStatistics>&&)> m_notificationCallback;
    106     Function<void(const RegistrableDomain&, uint64_t, const RegistrableDomain&)> m_requestStorageAccessUnderOpenerCallback;
     103    Function<void(PAL::SessionID, const RegistrableDomain&, uint64_t, const RegistrableDomain&)> m_requestStorageAccessUnderOpenerCallback;
    107104    Function<void(PAL::SessionID, const RegistrableDomain&)> m_logUserInteractionNotificationCallback;
    108105    Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)> m_logWebSocketLoadingNotificationCallback;
    109106    Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)> m_logSubresourceLoadingNotificationCallback;
    110107    Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&)> m_logSubresourceRedirectNotificationCallback;
    111 
    112     Timer m_notificationTimer;
    113108#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
    114109    uint64_t m_loggingCounter { 0 };
  • tags/Safari-608.1.13.4/Source/WebCore/testing/Internals.cpp

    r243324 r243723  
    49194919void Internals::notifyResourceLoadObserver()
    49204920{
    4921     ResourceLoadObserver::shared().notifyObserver();
     4921    ResourceLoadObserver::shared().updateCentralStatisticsStore();
    49224922}
    49234923
  • tags/Safari-608.1.13.4/Source/WebKit/CMakeLists.txt

    r242503 r243723  
    145145    UIProcess/WebProcessPool.messages.in
    146146    UIProcess/WebProcessProxy.messages.in
    147     UIProcess/WebResourceLoadStatisticsStore.messages.in
    148147
    149148    UIProcess/Automation/WebAutomationSession.messages.in
  • tags/Safari-608.1.13.4/Source/WebKit/ChangeLog

    r243651 r243723  
     12019-04-01  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r243671. rdar://problem/47859936
     4
     5    Move WebResourceLoadStatisticsStore IPC calls from the UI process to the network process
     6    https://bugs.webkit.org/show_bug.cgi?id=196407
     7    <rdar://problem/47859936>
     8   
     9    Reviewed by Brent Fulgham.
     10   
     11    Source/WebCore:
     12   
     13    Test: http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture.html
     14   
     15    This patch removes old code for the batching into "statistics updated" calls.
     16    Since the move of Resource Load Statistics to the network process, all such
     17    collection is done directly through dedicated calls to the network process.
     18   
     19    The remaining functionality was renamed to make it more clear, i.e.
     20    ResourceLoadObserver::notifyObserver() renamed to
     21    ResourceLoadObserver::updateCentralStatisticsStore().
     22   
     23    * loader/ResourceLoadObserver.cpp:
     24    (WebCore::ResourceLoadObserver::setStatisticsUpdatedCallback):
     25    (WebCore::ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback):
     26    (WebCore::ResourceLoadObserver::logSubresourceLoading):
     27    (WebCore::ResourceLoadObserver::logWebSocketLoading):
     28    (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
     29    (WebCore::ResourceLoadObserver::requestStorageAccessUnderOpener):
     30    (WebCore::ResourceLoadObserver::updateCentralStatisticsStore):
     31    (WebCore::ResourceLoadObserver::clearState):
     32    (WebCore::ResourceLoadObserver::setNotificationCallback): Deleted.
     33    (WebCore::ResourceLoadObserver::ResourceLoadObserver): Deleted.
     34    (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded): Deleted.
     35    (WebCore::ResourceLoadObserver::notifyObserver): Deleted.
     36    * loader/ResourceLoadObserver.h:
     37    * testing/Internals.cpp:
     38    (WebCore::Internals::notifyResourceLoadObserver):
     39   
     40    Source/WebKit:
     41   
     42    The two WebResourceLoadStatisticsStore IPC endpoints were left behind when we
     43    moved Resource Load Statistics from the UI process to the network process. One
     44    of the endpoints is the message RequestStorageAccessUnderOpener which underpins
     45    our compatibility fix for federated logins using popups. This patch redirects
     46    these IPC calls to the network process and cleans up some assumptions around
     47    them.
     48   
     49    * CMakeLists.txt:
     50        Removed the old IPC receiver.
     51    * DerivedSources.make:
     52        Removed the old IPC receiver.
     53    * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
     54    (WebKit::WebResourceLoadStatisticsStore::requestUpdate): Deleted.
     55        This is no longer needed since there is a dedicated update mechanism
     56        that actually sends the update.
     57    * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
     58    * NetworkProcess/NetworkConnectionToWebProcess.cpp:
     59    (WebKit::NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated):
     60    (WebKit::NetworkConnectionToWebProcess::requestStorageAccessUnderOpener):
     61        Two new IPC receivers to pipe the calls to the network process.
     62    (WebKit::NetworkConnectionToWebProcess::requestResourceLoadStatisticsUpdate): Deleted.
     63        NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated now serves
     64        this purpose.
     65    * NetworkProcess/NetworkConnectionToWebProcess.h:
     66    * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
     67    * UIProcess/WebResourceLoadStatisticsStore.messages.in: Removed.
     68        Removed the old IPC receiver.
     69    * UIProcess/WebsiteData/WebsiteDataStore.cpp:
     70    * WebKit.xcodeproj/project.pbxproj:
     71    * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     72    (WKBundleResourceLoadStatisticsNotifyObserver):
     73        Function name update.
     74    * WebProcess/WebProcess.cpp:
     75        Now calls IPC to the network process instead of the UI process.
     76   
     77    LayoutTests:
     78   
     79    * http/tests/storageAccess/deny-storage-access-under-opener-expected.txt:
     80    * http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-expected.txt:
     81    * http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-expected.txt: Added.
     82    * http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture.html: Added.
     83    * http/tests/storageAccess/resources/get-cookies.php:
     84    * http/tests/storageAccess/resources/produce-user-gesture-set-cookie-and-report-back.html: Added.
     85   
     86   
     87    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     88
     89    2019-03-29  John Wilander  <wilander@apple.com>
     90
     91            Move WebResourceLoadStatisticsStore IPC calls from the UI process to the network process
     92            https://bugs.webkit.org/show_bug.cgi?id=196407
     93            <rdar://problem/47859936>
     94
     95            Reviewed by Brent Fulgham.
     96
     97            The two WebResourceLoadStatisticsStore IPC endpoints were left behind when we
     98            moved Resource Load Statistics from the UI process to the network process. One
     99            of the endpoints is the message RequestStorageAccessUnderOpener which underpins
     100            our compatibility fix for federated logins using popups. This patch redirects
     101            these IPC calls to the network process and cleans up some assumptions around
     102            them.
     103
     104            * CMakeLists.txt:
     105                Removed the old IPC receiver.
     106            * DerivedSources.make:
     107                Removed the old IPC receiver.
     108            * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
     109            (WebKit::WebResourceLoadStatisticsStore::requestUpdate): Deleted.
     110                This is no longer needed since there is a dedicated update mechanism
     111                that actually sends the update.
     112            * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
     113            * NetworkProcess/NetworkConnectionToWebProcess.cpp:
     114            (WebKit::NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated):
     115            (WebKit::NetworkConnectionToWebProcess::requestStorageAccessUnderOpener):
     116                Two new IPC receivers to pipe the calls to the network process.
     117            (WebKit::NetworkConnectionToWebProcess::requestResourceLoadStatisticsUpdate): Deleted.
     118                NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated now serves
     119                this purpose.
     120            * NetworkProcess/NetworkConnectionToWebProcess.h:
     121            * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
     122            * UIProcess/WebResourceLoadStatisticsStore.messages.in: Removed.
     123                Removed the old IPC receiver.
     124            * UIProcess/WebsiteData/WebsiteDataStore.cpp:
     125            * WebKit.xcodeproj/project.pbxproj:
     126            * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     127            (WKBundleResourceLoadStatisticsNotifyObserver):
     128                Function name update.
     129            * WebProcess/WebProcess.cpp:
     130                Now calls IPC to the network process instead of the UI process.
     131
    11322019-03-29  Babak Shafiei  <bshafiei@apple.com>
    2133
  • tags/Safari-608.1.13.4/Source/WebKit/DerivedSources.make

    r243195 r243723  
    179179    WebRTCResolver \
    180180    WebRTCSocket \
    181     WebResourceLoadStatisticsStore \
    182181    WebResourceLoader \
    183182    WebSWClientConnection \
  • tags/Safari-608.1.13.4/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp

    r243181 r243723  
    4343#include "WebProcessPool.h"
    4444#include "WebProcessProxy.h"
    45 #include "WebResourceLoadStatisticsStoreMessages.h"
    4645#include "WebResourceLoadStatisticsTelemetry.h"
    4746#include "WebsiteDataFetchOption.h"
     
    252251}
    253252
    254 void WebResourceLoadStatisticsStore::requestUpdate()
    255 {
    256     resourceLoadStatisticsUpdated({ });
    257 }
    258 
    259253void WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated(Vector<WebCore::ResourceLoadStatistics>&& origins)
    260254{
  • tags/Safari-608.1.13.4/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h

    r243181 r243723  
    6767};
    6868
    69 class WebResourceLoadStatisticsStore final : public ThreadSafeRefCounted<WebResourceLoadStatisticsStore, WTF::DestructionThread::Main>, public IPC::MessageReceiver {
     69class WebResourceLoadStatisticsStore final : public ThreadSafeRefCounted<WebResourceLoadStatisticsStore, WTF::DestructionThread::Main> {
    7070public:
    7171    using ResourceLoadStatistics = WebCore::ResourceLoadStatistics;
     
    121121    void requestStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<FrameID>, PageID, CompletionHandler<void(StorageAccessStatus)>&&);
    122122    void requestStorageAccessGranted(const SubFrameDomain&, const TopFrameDomain&, FrameID, PageID, CompletionHandler<void(bool)>&&);
    123     void requestUpdate();
    124123    void setLastSeen(const RegistrableDomain&, Seconds, CompletionHandler<void()>&&);
    125124    void setPrevalentResource(const RegistrableDomain&, CompletionHandler<void()>&&);
     
    179178    void notifyPageStatisticsTelemetryFinished(unsigned totalPrevalentResources, unsigned totalPrevalentResourcesWithUserInteraction, unsigned top3SubframeUnderTopFrameOrigins) const;
    180179
     180    void resourceLoadStatisticsUpdated(Vector<ResourceLoadStatistics>&&);
     181    void requestStorageAccessUnderOpener(DomainInNeedOfStorageAccess&&, uint64_t openerPageID, OpenerDomain&&);
     182
    181183private:
    182184    explicit WebResourceLoadStatisticsStore(NetworkSession&, const String&, ShouldIncludeLocalhost);
     
    184186    void postTask(WTF::Function<void()>&&);
    185187    static void postTaskReply(WTF::Function<void()>&&);
    186 
    187     // IPC::MessageReceiver.
    188     void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
    189 
    190     // IPC message handlers.
    191     void resourceLoadStatisticsUpdated(Vector<ResourceLoadStatistics>&& origins);
    192     void requestStorageAccessUnderOpener(DomainInNeedOfStorageAccess&&, uint64_t openerPageID, OpenerDomain&&);
    193188
    194189    void performDailyTasks();
  • tags/Safari-608.1.13.4/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp

    r243258 r243723  
    654654}
    655655
    656 void NetworkConnectionToWebProcess::requestResourceLoadStatisticsUpdate()
     656void NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated(Vector<WebCore::ResourceLoadStatistics>&& statistics)
    657657{
    658658    for (auto& networkSession : networkProcess().networkSessions().values()) {
     
    661661
    662662        if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics())
    663             resourceLoadStatistics->requestUpdate();
     663            resourceLoadStatistics->resourceLoadStatisticsUpdated(WTFMove(statistics));
    664664    }
    665665}
     
    673673{
    674674    networkProcess().requestStorageAccessGranted(sessionID, subFrameDomain, topFrameDomain, frameID, pageID, WTFMove(completionHandler));
     675}
     676
     677void NetworkConnectionToWebProcess::requestStorageAccessUnderOpener(PAL::SessionID sessionID, WebCore::RegistrableDomain&& domainInNeedOfStorageAccess, uint64_t openerPageID, WebCore::RegistrableDomain&& openerDomain)
     678{
     679    if (auto networkSession = networkProcess().networkSession(sessionID)) {
     680        if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics())
     681            resourceLoadStatistics->requestStorageAccessUnderOpener(WTFMove(domainInNeedOfStorageAccess), openerPageID, WTFMove(openerDomain));
     682    }
    675683}
    676684#endif
  • tags/Safari-608.1.13.4/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h

    r243258 r243723  
    219219    void logSubresourceLoading(PAL::SessionID, const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen);
    220220    void logSubresourceRedirect(PAL::SessionID, const RegistrableDomain& sourceDomain, const RegistrableDomain& targetDomain);
    221     void requestResourceLoadStatisticsUpdate();
     221    void resourceLoadStatisticsUpdated(Vector<WebCore::ResourceLoadStatistics>&&);
    222222    void hasStorageAccess(PAL::SessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, uint64_t pageID, CompletionHandler<void(bool)>&&);
    223223    void requestStorageAccess(PAL::SessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, uint64_t pageID, CompletionHandler<void(bool)>&&);
     224    void requestStorageAccessUnderOpener(PAL::SessionID, WebCore::RegistrableDomain&& domainInNeedOfStorageAccess, uint64_t openerPageID, WebCore::RegistrableDomain&& openerDomain);
    224225#endif
    225226
  • tags/Safari-608.1.13.4/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in

    r243345 r243723  
    6363    LogSubresourceLoading(PAL::SessionID sessionID, WebCore::RegistrableDomain targetDomain, WebCore::RegistrableDomain topFrameDomain, WallTime lastSeen)
    6464    LogSubresourceRedirect(PAL::SessionID sessionID, WebCore::RegistrableDomain sourceDomain, WebCore::RegistrableDomain targetDomain)
    65     RequestResourceLoadStatisticsUpdate();
     65    ResourceLoadStatisticsUpdated(Vector<WebCore::ResourceLoadStatistics> statistics)
    6666    HasStorageAccess(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain, uint64_t frameID, uint64_t pageID) -> (bool hasStorageAccess) Async
    6767    RequestStorageAccess(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain, uint64_t frameID, uint64_t pageID) -> (bool accessGranted) Async
     68    RequestStorageAccessUnderOpener(PAL::SessionID sessionID, WebCore::RegistrableDomain domainInNeedOfStorageAccess, uint64_t openerPageID, WebCore::RegistrableDomain openerDomain)
    6869#endif
    6970
  • tags/Safari-608.1.13.4/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp

    r243375 r243723  
    4141#include "WebProcessPool.h"
    4242#include "WebResourceLoadStatisticsStore.h"
    43 #include "WebResourceLoadStatisticsStoreMessages.h"
    4443#include "WebsiteData.h"
    4544#include "WebsiteDataStoreClient.h"
  • tags/Safari-608.1.13.4/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r243384 r243723  
    11231123                7A78FF32224191960096483E /* WKStorageAccessAlert.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A78FF2E224191750096483E /* WKStorageAccessAlert.h */; };
    11241124                7A78FF332241919B0096483E /* WKStorageAccessAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7A78FF2F224191760096483E /* WKStorageAccessAlert.mm */; };
    1125                 7A791EFA1C7CFCF100C4C52B /* WebResourceLoadStatisticsStoreMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A791EF91C7CFB3700C4C52B /* WebResourceLoadStatisticsStoreMessageReceiver.cpp */; };
    1126                 7A791EFB1C7CFD0100C4C52B /* WebResourceLoadStatisticsStoreMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A791EF81C7CFB1000C4C52B /* WebResourceLoadStatisticsStoreMessages.h */; };
    11271125                7A821F4C1E2F673900604577 /* LegacyCustomProtocolManagerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A821F4B1E2F664800604577 /* LegacyCustomProtocolManagerClient.h */; };
    11281126                7A821F501E2F7A7500604577 /* APICustomProtocolManagerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A821F4F1E2F7A5C00604577 /* APICustomProtocolManagerClient.h */; };
     
    35853583                7A78FF2E224191750096483E /* WKStorageAccessAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKStorageAccessAlert.h; sourceTree = "<group>"; };
    35863584                7A78FF2F224191760096483E /* WKStorageAccessAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKStorageAccessAlert.mm; sourceTree = "<group>"; };
    3587                 7A791EF81C7CFB1000C4C52B /* WebResourceLoadStatisticsStoreMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebResourceLoadStatisticsStoreMessages.h; path = DerivedSources/WebKit2/WebResourceLoadStatisticsStoreMessages.h; sourceTree = BUILT_PRODUCTS_DIR; };
    3588                 7A791EF91C7CFB3700C4C52B /* WebResourceLoadStatisticsStoreMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebResourceLoadStatisticsStoreMessageReceiver.cpp; path = DerivedSources/WebKit2/WebResourceLoadStatisticsStoreMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
    35893585                7A821F491E2F65DD00604577 /* LegacyCustomProtocolManagerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LegacyCustomProtocolManagerProxy.cpp; path = CustomProtocols/LegacyCustomProtocolManagerProxy.cpp; sourceTree = "<group>"; };
    35903586                7A821F4B1E2F664800604577 /* LegacyCustomProtocolManagerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyCustomProtocolManagerClient.h; sourceTree = "<group>"; };
     
    35953591                7A8A9D591EF13020009801AE /* APIInjectedBundleBundleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIInjectedBundleBundleClient.h; sourceTree = "<group>"; };
    35963592                7A8A9D5B1EF1458E009801AE /* APIInjectedBundlePageResourceLoadClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIInjectedBundlePageResourceLoadClient.h; sourceTree = "<group>"; };
    3597                 7A9CD8C21C779AD600D9F6C7 /* WebResourceLoadStatisticsStore.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebResourceLoadStatisticsStore.messages.in; sourceTree = "<group>"; };
    35983593                7AB6EA441EEAAE2300037B2B /* APIIconDatabaseClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIIconDatabaseClient.h; sourceTree = "<group>"; };
    35993594                7AB6EA461EEAB6B000037B2B /* APIGeolocationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIGeolocationProvider.h; sourceTree = "<group>"; };
     
    76157610                                BC032DCF10F4389F0058C15A /* WebProcessProxy.h */,
    76167611                                BCEE7AB312817095009827DA /* WebProcessProxy.messages.in */,
    7617                                 7A9CD8C21C779AD600D9F6C7 /* WebResourceLoadStatisticsStore.messages.in */,
    76187612                                51D124241E6D3CC3002B2820 /* WebURLSchemeHandler.cpp */,
    76197613                                51D124251E6D3CC3002B2820 /* WebURLSchemeHandler.h */,
     
    86688662                                51F060DD1654317500F3281B /* WebResourceLoaderMessageReceiver.cpp */,
    86698663                                51F060DE1654317500F3281B /* WebResourceLoaderMessages.h */,
    8670                                 7A791EF91C7CFB3700C4C52B /* WebResourceLoadStatisticsStoreMessageReceiver.cpp */,
    8671                                 7A791EF81C7CFB1000C4C52B /* WebResourceLoadStatisticsStoreMessages.h */,
    86728664                                51F060DD1654317500F3281F /* WebRTCMonitorMessageReceiver.cpp */,
    86738665                                51F060DD1654317500F3282C /* WebRTCResolverMessageReceiver.cpp */,
     
    96889680                                51F060E01654317F00F3281B /* WebResourceLoaderMessages.h in Headers */,
    96899681                                7AFBD36321E50F39005DBACB /* WebResourceLoadStatisticsStore.h in Headers */,
    9690                                 7A791EFB1C7CFD0100C4C52B /* WebResourceLoadStatisticsStoreMessages.h in Headers */,
    96919682                                413075B01DE85F580039EC69 /* WebRTCMonitor.h in Headers */,
    96929683                                41FAF5F51E3C0649001AE678 /* WebRTCResolver.h in Headers */,
     
    1119911190                                BCEE7AD012817988009827DA /* WebProcessProxyMessageReceiver.cpp in Sources */,
    1120011191                                51F060E11654318500F3281B /* WebResourceLoaderMessageReceiver.cpp in Sources */,
    11201                                 7A791EFA1C7CFCF100C4C52B /* WebResourceLoadStatisticsStoreMessageReceiver.cpp in Sources */,
    1120211192                                51F060E11654318500F3281F /* WebRTCMonitorMessageReceiver.cpp in Sources */,
    1120311193                                51F060E11654318500F3282C /* WebRTCResolverMessageReceiver.cpp in Sources */,
  • tags/Safari-608.1.13.4/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r242339 r243723  
    324324void WKBundleResourceLoadStatisticsNotifyObserver(WKBundleRef)
    325325{
    326     WebCore::ResourceLoadObserver::shared().notifyObserver();
     326    WebCore::ResourceLoadObserver::shared().updateCentralStatisticsStore();
    327327}
    328328
  • tags/Safari-608.1.13.4/Source/WebKit/WebProcess/WebProcess.cpp

    r243384 r243723  
    6666#include "WebProcessPoolMessages.h"
    6767#include "WebProcessProxyMessages.h"
    68 #include "WebResourceLoadStatisticsStoreMessages.h"
    6968#include "WebSWContextManagerConnection.h"
    7069#include "WebSWContextManagerConnectionMessages.h"
     
    216215
    217216#if ENABLE(RESOURCE_LOAD_STATISTICS)
    218     ResourceLoadObserver::shared().setNotificationCallback([this] (Vector<ResourceLoadStatistics>&& statistics) {
    219         parentProcessConnection()->send(Messages::WebResourceLoadStatisticsStore::ResourceLoadStatisticsUpdated(WTFMove(statistics)), 0);
    220 
    221         ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RequestResourceLoadStatisticsUpdate(), 0);
     217    ResourceLoadObserver::shared().setStatisticsUpdatedCallback([this] (Vector<ResourceLoadStatistics>&& statistics) {
     218        ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::ResourceLoadStatisticsUpdated(WTFMove(statistics)), 0);
    222219    });
    223220
    224     ResourceLoadObserver::shared().setRequestStorageAccessUnderOpenerCallback([this] (const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, const RegistrableDomain& openerDomain) {
    225         parentProcessConnection()->send(Messages::WebResourceLoadStatisticsStore::RequestStorageAccessUnderOpener(domainInNeedOfStorageAccess, openerPageID, openerDomain), 0);
     221    ResourceLoadObserver::shared().setRequestStorageAccessUnderOpenerCallback([this] (PAL::SessionID sessionID, const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, const RegistrableDomain& openerDomain) {
     222        ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RequestStorageAccessUnderOpener(sessionID, domainInNeedOfStorageAccess, openerPageID, openerDomain), 0);
    226223    });
    227224#endif
Note: See TracChangeset for help on using the changeset viewer.