| Differences between
and this patch
- Source/WebCore/ChangeLog +16 lines
Lines 1-3 Source/WebCore/ChangeLog_sec1
1
2018-03-14  John Wilander  <wilander@apple.com>
2
3
        Resource Load Statistics: Add clearing of storage access to WebResourceLoadStatisticsStore::clearInMemory()
4
        https://bugs.webkit.org/show_bug.cgi?id=183641
5
        <rdar://problem/38469497>
6
7
        Reviewed by Brent Fulgham and Chris Dumez.
8
9
        No new tests. This change is to stabilize existing layout tests.
10
        See Ryan Haddad's comment in https://bugs.webkit.org/show_bug.cgi?id=183620.
11
12
        * platform/network/NetworkStorageSession.h:
13
        * platform/network/cf/NetworkStorageSessionCFNet.cpp:
14
        (WebCore::NetworkStorageSession::removeAllStorageAccess):
15
            New function to clear out all storage access entries.
16
1
2018-03-14  Mark Lam  <mark.lam@apple.com>
17
2018-03-14  Mark Lam  <mark.lam@apple.com>
2
18
3
        Enhance the MacroAssembler and LinkBuffer to support pointer profiling.
19
        Enhance the MacroAssembler and LinkBuffer to support pointer profiling.
- Source/WebCore/platform/network/NetworkStorageSession.h +1 lines
Lines 109-114 public: Source/WebCore/platform/network/NetworkStorageSession.h_sec1
109
    WEBCORE_EXPORT void grantStorageAccess(const String& resourceDomain, const String& firstPartyDomain, std::optional<uint64_t> frameID, uint64_t pageID);
109
    WEBCORE_EXPORT void grantStorageAccess(const String& resourceDomain, const String& firstPartyDomain, std::optional<uint64_t> frameID, uint64_t pageID);
110
    WEBCORE_EXPORT void removeStorageAccessForFrame(uint64_t frameID, uint64_t pageID);
110
    WEBCORE_EXPORT void removeStorageAccessForFrame(uint64_t frameID, uint64_t pageID);
111
    WEBCORE_EXPORT void removeStorageAccessForAllFramesOnPage(uint64_t pageID);
111
    WEBCORE_EXPORT void removeStorageAccessForAllFramesOnPage(uint64_t pageID);
112
    WEBCORE_EXPORT void removeAllStorageAccess();
112
#endif
113
#endif
113
#elif USE(SOUP)
114
#elif USE(SOUP)
114
    NetworkStorageSession(PAL::SessionID, std::unique_ptr<SoupNetworkSession>&&);
115
    NetworkStorageSession(PAL::SessionID, std::unique_ptr<SoupNetworkSession>&&);
- Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp +6 lines
Lines 360-365 void NetworkStorageSession::removeStorag Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp_sec1
360
    m_framesGrantedStorageAccess.remove(pageID);
360
    m_framesGrantedStorageAccess.remove(pageID);
361
}
361
}
362
362
363
void NetworkStorageSession::removeAllStorageAccess()
364
{
365
    m_pagesGrantedStorageAccess.clear();
366
    m_framesGrantedStorageAccess.clear();
367
}
368
363
#endif // HAVE(CFNETWORK_STORAGE_PARTITIONING)
369
#endif // HAVE(CFNETWORK_STORAGE_PARTITIONING)
364
370
365
#if !PLATFORM(COCOA)
371
#if !PLATFORM(COCOA)
- Source/WebKit/ChangeLog +35 lines
Lines 1-3 Source/WebKit/ChangeLog_sec1
1
2018-03-14  John Wilander  <wilander@apple.com>
2
3
        Resource Load Statistics: Add clearing of storage access to WebResourceLoadStatisticsStore::clearInMemory()
4
        https://bugs.webkit.org/show_bug.cgi?id=183641
5
        <rdar://problem/38469497>
6
7
        Reviewed by Brent Fulgham and Chris Dumez.
8
9
        This change is to stabilize existing layout tests by removing
10
        all storage access entries on a call to 
11
        WebResourceLoadStatisticsStore::clearInMemory().
12
        See Ryan Haddad's comment in https://bugs.webkit.org/show_bug.cgi?id=183620.
13
14
        Almost all of the code changes are piping to get this
15
        call from the WebResourceLoadStatisticsStore to
16
        WebCore::NetworkStorageSession where entries reside.
17
18
        * NetworkProcess/NetworkProcess.cpp:
19
        (WebKit::NetworkProcess::removeAllStorageAccess):
20
        * NetworkProcess/NetworkProcess.h:
21
        * NetworkProcess/NetworkProcess.messages.in:
22
        * UIProcess/Network/NetworkProcessProxy.cpp:
23
        (WebKit::NetworkProcessProxy::removeAllStorageAccess):
24
        * UIProcess/Network/NetworkProcessProxy.h:
25
        * UIProcess/WebResourceLoadStatisticsStore.cpp:
26
        (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
27
        (WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
28
        (WebKit::WebResourceLoadStatisticsStore::clearInMemory):
29
            Now also clears all storage access entries in the network process.
30
        * UIProcess/WebResourceLoadStatisticsStore.h:
31
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
32
        (WebKit::WebsiteDataStore::removeAllStorageAccessHandler):
33
        (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
34
        * UIProcess/WebsiteData/WebsiteDataStore.h:
35
1
2018-03-14  Tim Horton  <timothy_horton@apple.com>
36
2018-03-14  Tim Horton  <timothy_horton@apple.com>
2
37
3
        Fix the build after r229567
38
        Fix the build after r229567
- Source/WebKit/NetworkProcess/NetworkProcess.cpp +8 lines
Lines 394-399 void NetworkProcess::grantStorageAccess( Source/WebKit/NetworkProcess/NetworkProcess.cpp_sec1
394
    parentProcessConnection()->send(Messages::NetworkProcessProxy::StorageAccessRequestResult(isStorageGranted, contextId), 0);
394
    parentProcessConnection()->send(Messages::NetworkProcessProxy::StorageAccessRequestResult(isStorageGranted, contextId), 0);
395
}
395
}
396
396
397
void NetworkProcess::removeAllStorageAccess(PAL::SessionID sessionID)
398
{
399
    if (auto* networkStorageSession = NetworkStorageSession::storageSession(sessionID))
400
        networkStorageSession->removeAllStorageAccess();
401
    else
402
        ASSERT_NOT_REACHED();
403
}
404
397
void NetworkProcess::removePrevalentDomains(PAL::SessionID sessionID, const Vector<String>& domains)
405
void NetworkProcess::removePrevalentDomains(PAL::SessionID sessionID, const Vector<String>& domains)
398
{
406
{
399
    if (auto* networkStorageSession = NetworkStorageSession::storageSession(sessionID))
407
    if (auto* networkStorageSession = NetworkStorageSession::storageSession(sessionID))
- Source/WebKit/NetworkProcess/NetworkProcess.h +1 lines
Lines 140-145 public: Source/WebKit/NetworkProcess/NetworkProcess.h_sec1
140
    void hasStorageAccessForFrame(PAL::SessionID, const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID, uint64_t contextId);
140
    void hasStorageAccessForFrame(PAL::SessionID, const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID, uint64_t contextId);
141
    void getAllStorageAccessEntries(PAL::SessionID, uint64_t contextId);
141
    void getAllStorageAccessEntries(PAL::SessionID, uint64_t contextId);
142
    void grantStorageAccess(PAL::SessionID, const String& resourceDomain, const String& firstPartyDomain, std::optional<uint64_t> frameID, uint64_t pageID, uint64_t contextId);
142
    void grantStorageAccess(PAL::SessionID, const String& resourceDomain, const String& firstPartyDomain, std::optional<uint64_t> frameID, uint64_t pageID, uint64_t contextId);
143
    void removeAllStorageAccess(PAL::SessionID);
143
    void removePrevalentDomains(PAL::SessionID, const Vector<String>& domains);
144
    void removePrevalentDomains(PAL::SessionID, const Vector<String>& domains);
144
#endif
145
#endif
145
146
- Source/WebKit/NetworkProcess/NetworkProcess.messages.in +1 lines
Lines 86-91 messages -> NetworkProcess LegacyReceive Source/WebKit/NetworkProcess/NetworkProcess.messages.in_sec1
86
    HasStorageAccessForFrame(PAL::SessionID sessionID, String resourceDomain, String firstPartyDomain, uint64_t frameID, uint64_t pageID, uint64_t contextId)
86
    HasStorageAccessForFrame(PAL::SessionID sessionID, String resourceDomain, String firstPartyDomain, uint64_t frameID, uint64_t pageID, uint64_t contextId)
87
    GetAllStorageAccessEntries(PAL::SessionID sessionID, uint64_t contextId)
87
    GetAllStorageAccessEntries(PAL::SessionID sessionID, uint64_t contextId)
88
    GrantStorageAccess(PAL::SessionID sessionID, String resourceDomain, String firstPartyDomain, std::optional<uint64_t> frameID, uint64_t pageID, uint64_t contextId)
88
    GrantStorageAccess(PAL::SessionID sessionID, String resourceDomain, String firstPartyDomain, std::optional<uint64_t> frameID, uint64_t pageID, uint64_t contextId)
89
    RemoveAllStorageAccess(PAL::SessionID sessionID)
89
    RemovePrevalentDomains(PAL::SessionID sessionID, Vector<String> domainsWithInteraction);
90
    RemovePrevalentDomains(PAL::SessionID sessionID, Vector<String> domainsWithInteraction);
90
#endif
91
#endif
91
92
- Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp -1 / +11 lines
Lines 154-165 static Vector<OperatingDate> mergeOperat Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp_sec1
154
    return mergedDates;
154
    return mergedDates;
155
}
155
}
156
156
157
WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore(const String& resourceLoadStatisticsDirectory, Function<void(const String&)>&& testingCallback, bool isEphemeral, UpdatePrevalentDomainsToPartitionOrBlockCookiesHandler&& updatePrevalentDomainsToPartitionOrBlockCookiesHandler, HasStorageAccessForFrameHandler&& hasStorageAccessForFrameHandler, GrantStorageAccessHandler&& grantStorageAccessHandler, RemovePrevalentDomainsHandler&& removeDomainsHandler)
157
WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore(const String& resourceLoadStatisticsDirectory, Function<void(const String&)>&& testingCallback, bool isEphemeral, UpdatePrevalentDomainsToPartitionOrBlockCookiesHandler&& updatePrevalentDomainsToPartitionOrBlockCookiesHandler, HasStorageAccessForFrameHandler&& hasStorageAccessForFrameHandler, GrantStorageAccessHandler&& grantStorageAccessHandler, RemoveAllStorageAccessHandler&& removeAllStorageAccessHandler, RemovePrevalentDomainsHandler&& removeDomainsHandler)
158
    : m_statisticsQueue(WorkQueue::create("WebResourceLoadStatisticsStore Process Data Queue", WorkQueue::Type::Serial, WorkQueue::QOS::Utility))
158
    : m_statisticsQueue(WorkQueue::create("WebResourceLoadStatisticsStore Process Data Queue", WorkQueue::Type::Serial, WorkQueue::QOS::Utility))
159
    , m_persistentStorage(*this, resourceLoadStatisticsDirectory, isEphemeral ? ResourceLoadStatisticsPersistentStorage::IsReadOnly::Yes : ResourceLoadStatisticsPersistentStorage::IsReadOnly::No)
159
    , m_persistentStorage(*this, resourceLoadStatisticsDirectory, isEphemeral ? ResourceLoadStatisticsPersistentStorage::IsReadOnly::Yes : ResourceLoadStatisticsPersistentStorage::IsReadOnly::No)
160
    , m_updatePrevalentDomainsToPartitionOrBlockCookiesHandler(WTFMove(updatePrevalentDomainsToPartitionOrBlockCookiesHandler))
160
    , m_updatePrevalentDomainsToPartitionOrBlockCookiesHandler(WTFMove(updatePrevalentDomainsToPartitionOrBlockCookiesHandler))
161
    , m_hasStorageAccessForFrameHandler(WTFMove(hasStorageAccessForFrameHandler))
161
    , m_hasStorageAccessForFrameHandler(WTFMove(hasStorageAccessForFrameHandler))
162
    , m_grantStorageAccessHandler(WTFMove(grantStorageAccessHandler))
162
    , m_grantStorageAccessHandler(WTFMove(grantStorageAccessHandler))
163
    , m_removeAllStorageAccessHandler(WTFMove(removeAllStorageAccessHandler))
163
    , m_removeDomainsHandler(WTFMove(removeDomainsHandler))
164
    , m_removeDomainsHandler(WTFMove(removeDomainsHandler))
164
    , m_dailyTasksTimer(RunLoop::main(), this, &WebResourceLoadStatisticsStore::performDailyTasks)
165
    , m_dailyTasksTimer(RunLoop::main(), this, &WebResourceLoadStatisticsStore::performDailyTasks)
165
    , m_statisticsTestingCallback(WTFMove(testingCallback))
166
    , m_statisticsTestingCallback(WTFMove(testingCallback))
Lines 410-415 void WebResourceLoadStatisticsStore::req Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp_sec2
410
#endif
411
#endif
411
}
412
}
412
413
414
void WebResourceLoadStatisticsStore::removeAllStorageAccess()
415
{
416
    ASSERT(!RunLoop::isMain());
417
    RunLoop::main().dispatch([this, protectedThis = makeRef(*this)] () {
418
        m_removeAllStorageAccessHandler();
419
    });
420
}
421
413
void WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData(CompletionHandler<void()>&& callback)
422
void WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData(CompletionHandler<void()>&& callback)
414
{
423
{
415
    ASSERT(!RunLoop::isMain());
424
    ASSERT(!RunLoop::isMain());
Lines 954-959 void WebResourceLoadStatisticsStore::cle Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp_sec3
954
    m_resourceStatisticsMap.clear();
963
    m_resourceStatisticsMap.clear();
955
    m_operatingDates.clear();
964
    m_operatingDates.clear();
956
965
966
    removeAllStorageAccess();
957
    updateCookiePartitioningForDomains({ }, { }, { }, ShouldClearFirst::Yes, []() { });
967
    updateCookiePartitioningForDomains({ }, { }, { }, ShouldClearFirst::Yes, []() { });
958
}
968
}
959
969
- Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h -3 / +6 lines
Lines 64-73 public: Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h_sec1
64
    using UpdatePrevalentDomainsToPartitionOrBlockCookiesHandler = WTF::Function<void(const Vector<String>& domainsToPartition, const Vector<String>& domainsToBlock, const Vector<String>& domainsToNeitherPartitionNorBlock, ShouldClearFirst)>;
64
    using UpdatePrevalentDomainsToPartitionOrBlockCookiesHandler = WTF::Function<void(const Vector<String>& domainsToPartition, const Vector<String>& domainsToBlock, const Vector<String>& domainsToNeitherPartitionNorBlock, ShouldClearFirst)>;
65
    using HasStorageAccessForFrameHandler = WTF::Function<void(const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID, WTF::Function<void(bool hasAccess)>&& callback)>;
65
    using HasStorageAccessForFrameHandler = WTF::Function<void(const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID, WTF::Function<void(bool hasAccess)>&& callback)>;
66
    using GrantStorageAccessHandler = WTF::Function<void(const String& resourceDomain, const String& firstPartyDomain, std::optional<uint64_t> frameID, uint64_t pageID, WTF::Function<void(bool wasGranted)>&& callback)>;
66
    using GrantStorageAccessHandler = WTF::Function<void(const String& resourceDomain, const String& firstPartyDomain, std::optional<uint64_t> frameID, uint64_t pageID, WTF::Function<void(bool wasGranted)>&& callback)>;
67
    using RemoveAllStorageAccessHandler = WTF::Function<void()>;
67
    using RemovePrevalentDomainsHandler = WTF::Function<void (const Vector<String>&)>;
68
    using RemovePrevalentDomainsHandler = WTF::Function<void (const Vector<String>&)>;
68
    static Ref<WebResourceLoadStatisticsStore> create(const String& resourceLoadStatisticsDirectory, Function<void (const String&)>&& testingCallback, bool isEphemeral, UpdatePrevalentDomainsToPartitionOrBlockCookiesHandler&& updatePrevalentDomainsToPartitionOrBlockCookiesHandler = [](const WTF::Vector<String>&, const WTF::Vector<String>&, const WTF::Vector<String>&, ShouldClearFirst) { }, HasStorageAccessForFrameHandler&& hasStorageAccessForFrameHandler = [](const String&, const String&, uint64_t, uint64_t, WTF::Function<void(bool)>&&) { }, GrantStorageAccessHandler&& grantStorageAccessHandler = [](const String&, const String&, std::optional<uint64_t>, uint64_t, WTF::Function<void(bool)>&&) { }, RemovePrevalentDomainsHandler&& removeDomainsHandler = [] (const WTF::Vector<String>&) { })
69
    static Ref<WebResourceLoadStatisticsStore> create(const String& resourceLoadStatisticsDirectory, Function<void (const String&)>&& testingCallback, bool isEphemeral, UpdatePrevalentDomainsToPartitionOrBlockCookiesHandler&& updatePrevalentDomainsToPartitionOrBlockCookiesHandler = [](const WTF::Vector<String>&, const WTF::Vector<String>&, const WTF::Vector<String>&, ShouldClearFirst) { }, HasStorageAccessForFrameHandler&& hasStorageAccessForFrameHandler = [](const String&, const String&, uint64_t, uint64_t, WTF::Function<void(bool)>&&) { }, GrantStorageAccessHandler&& grantStorageAccessHandler = [](const String&, const String&, std::optional<uint64_t>, uint64_t, WTF::Function<void(bool)>&&) { }, RemoveAllStorageAccessHandler&& removeAllStorageAccessHandler = []() { }, RemovePrevalentDomainsHandler&& removeDomainsHandler = [] (const WTF::Vector<String>&) { })
69
    {
70
    {
70
        return adoptRef(*new WebResourceLoadStatisticsStore(resourceLoadStatisticsDirectory, WTFMove(testingCallback), isEphemeral, WTFMove(updatePrevalentDomainsToPartitionOrBlockCookiesHandler), WTFMove(hasStorageAccessForFrameHandler), WTFMove(grantStorageAccessHandler), WTFMove(removeDomainsHandler)));
71
        return adoptRef(*new WebResourceLoadStatisticsStore(resourceLoadStatisticsDirectory, WTFMove(testingCallback), isEphemeral, WTFMove(updatePrevalentDomainsToPartitionOrBlockCookiesHandler), WTFMove(hasStorageAccessForFrameHandler), WTFMove(grantStorageAccessHandler), WTFMove(removeAllStorageAccessHandler), WTFMove(removeDomainsHandler)));
71
    }
72
    }
72
73
73
    ~WebResourceLoadStatisticsStore();
74
    ~WebResourceLoadStatisticsStore();
Lines 151-157 public: Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h_sec2
151
    void logTestingEvent(const String&);
152
    void logTestingEvent(const String&);
152
153
153
private:
154
private:
154
    WebResourceLoadStatisticsStore(const String&, Function<void(const String&)>&& testingCallback, bool isEphemeral, UpdatePrevalentDomainsToPartitionOrBlockCookiesHandler&&, HasStorageAccessForFrameHandler&&, GrantStorageAccessHandler&&, RemovePrevalentDomainsHandler&&);
155
    WebResourceLoadStatisticsStore(const String&, Function<void(const String&)>&& testingCallback, bool isEphemeral, UpdatePrevalentDomainsToPartitionOrBlockCookiesHandler&&, HasStorageAccessForFrameHandler&&, GrantStorageAccessHandler&&, RemoveAllStorageAccessHandler&&, RemovePrevalentDomainsHandler&&);
155
156
156
    void removeDataRecords(CompletionHandler<void()>&&);
157
    void removeDataRecords(CompletionHandler<void()>&&);
157
158
Lines 178-183 private: Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h_sec3
178
    void processStatisticsAndDataRecords();
179
    void processStatisticsAndDataRecords();
179
180
180
    void resetCookiePartitioningState();
181
    void resetCookiePartitioningState();
182
    void removeAllStorageAccess();
181
183
182
    void setDebugLogggingEnabled(bool enabled) { m_debugLoggingEnabled  = enabled; }
184
    void setDebugLogggingEnabled(bool enabled) { m_debugLoggingEnabled  = enabled; }
183
185
Lines 212-217 private: Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h_sec4
212
    UpdatePrevalentDomainsToPartitionOrBlockCookiesHandler m_updatePrevalentDomainsToPartitionOrBlockCookiesHandler;
214
    UpdatePrevalentDomainsToPartitionOrBlockCookiesHandler m_updatePrevalentDomainsToPartitionOrBlockCookiesHandler;
213
    HasStorageAccessForFrameHandler m_hasStorageAccessForFrameHandler;
215
    HasStorageAccessForFrameHandler m_hasStorageAccessForFrameHandler;
214
    GrantStorageAccessHandler m_grantStorageAccessHandler;
216
    GrantStorageAccessHandler m_grantStorageAccessHandler;
217
    RemoveAllStorageAccessHandler m_removeAllStorageAccessHandler;
215
    RemovePrevalentDomainsHandler m_removeDomainsHandler;
218
    RemovePrevalentDomainsHandler m_removeDomainsHandler;
216
219
217
    WallTime m_endOfGrandfatheringTimestamp;
220
    WallTime m_endOfGrandfatheringTimestamp;
- Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp +6 lines
Lines 428-433 void NetworkProcessProxy::grantStorageAc Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp_sec1
428
    send(Messages::NetworkProcess::GrantStorageAccess(sessionID, resourceDomain, firstPartyDomain, frameID, pageID, contextId), 0);
428
    send(Messages::NetworkProcess::GrantStorageAccess(sessionID, resourceDomain, firstPartyDomain, frameID, pageID, contextId), 0);
429
}
429
}
430
430
431
void NetworkProcessProxy::removeAllStorageAccess(PAL::SessionID sessionID)
432
{
433
    if (canSendMessage())
434
        send(Messages::NetworkProcess::RemoveAllStorageAccess(sessionID), 0);
435
}
436
431
void NetworkProcessProxy::storageAccessRequestResult(bool wasGranted, uint64_t contextId)
437
void NetworkProcessProxy::storageAccessRequestResult(bool wasGranted, uint64_t contextId)
432
{
438
{
433
    auto callback = m_storageAccessResponseCallbackMap.take(contextId);
439
    auto callback = m_storageAccessResponseCallbackMap.take(contextId);
- Source/WebKit/UIProcess/Network/NetworkProcessProxy.h +1 lines
Lines 82-87 public: Source/WebKit/UIProcess/Network/NetworkProcessProxy.h_sec1
82
    void hasStorageAccessForFrame(PAL::SessionID, const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID, CompletionHandler<void(bool)>&& callback);
82
    void hasStorageAccessForFrame(PAL::SessionID, const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID, CompletionHandler<void(bool)>&& callback);
83
    void getAllStorageAccessEntries(PAL::SessionID, CompletionHandler<void(Vector<String>&& domains)>&&);
83
    void getAllStorageAccessEntries(PAL::SessionID, CompletionHandler<void(Vector<String>&& domains)>&&);
84
    void grantStorageAccess(PAL::SessionID, const String& resourceDomain, const String& firstPartyDomain, std::optional<uint64_t> frameID, uint64_t pageID, CompletionHandler<void(bool)>&& callback);
84
    void grantStorageAccess(PAL::SessionID, const String& resourceDomain, const String& firstPartyDomain, std::optional<uint64_t> frameID, uint64_t pageID, CompletionHandler<void(bool)>&& callback);
85
    void removeAllStorageAccess(PAL::SessionID);
85
#endif
86
#endif
86
87
87
    void writeBlobToFilePath(const WebCore::URL&, const String& path, CompletionHandler<void(bool)>&& callback);
88
    void writeBlobToFilePath(const WebCore::URL&, const String& path, CompletionHandler<void(bool)>&& callback);
- Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp +10 lines
Lines 1214-1219 void WebsiteDataStore::grantStorageAcces Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp_sec1
1214
        processPool->networkProcess()->grantStorageAccess(m_sessionID, resourceDomain, firstPartyDomain, frameID, pageID, WTFMove(callback));
1214
        processPool->networkProcess()->grantStorageAccess(m_sessionID, resourceDomain, firstPartyDomain, frameID, pageID, WTFMove(callback));
1215
}
1215
}
1216
1216
1217
void WebsiteDataStore::removeAllStorageAccessHandler()
1218
{
1219
    for (auto& processPool : processPools()) {
1220
        if (auto networkProcess = processPool->networkProcess())
1221
            networkProcess->removeAllStorageAccess(m_sessionID);
1222
    }
1223
}
1224
1217
void WebsiteDataStore::removePrevalentDomains(const Vector<String>& domains)
1225
void WebsiteDataStore::removePrevalentDomains(const Vector<String>& domains)
1218
{
1226
{
1219
    for (auto& processPool : processPools())
1227
    for (auto& processPool : processPools())
Lines 1444-1449 void WebsiteDataStore::enableResourceLoa Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp_sec2
1444
        hasStorageAccessForFrameHandler(resourceDomain, firstPartyDomain, frameID, pageID, WTFMove(callback));
1452
        hasStorageAccessForFrameHandler(resourceDomain, firstPartyDomain, frameID, pageID, WTFMove(callback));
1445
    }, [this, protectedThis = makeRef(*this)] (const String& resourceDomain, const String& firstPartyDomain, std::optional<uint64_t> frameID, uint64_t pageID, WTF::CompletionHandler<void(bool wasGranted)>&& callback) {
1453
    }, [this, protectedThis = makeRef(*this)] (const String& resourceDomain, const String& firstPartyDomain, std::optional<uint64_t> frameID, uint64_t pageID, WTF::CompletionHandler<void(bool wasGranted)>&& callback) {
1446
        grantStorageAccessHandler(resourceDomain, firstPartyDomain, frameID, pageID, WTFMove(callback));
1454
        grantStorageAccessHandler(resourceDomain, firstPartyDomain, frameID, pageID, WTFMove(callback));
1455
    }, [this, protectedThis = makeRef(*this)] () {
1456
        removeAllStorageAccessHandler();
1447
    }, [this, protectedThis = makeRef(*this)] (const Vector<String>& domainsToRemove) {
1457
    }, [this, protectedThis = makeRef(*this)] (const Vector<String>& domainsToRemove) {
1448
        removePrevalentDomains(domainsToRemove);
1458
        removePrevalentDomains(domainsToRemove);
1449
    });
1459
    });
- Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h +1 lines
Lines 127-132 public: Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h_sec1
127
    void hasStorageAccessForFrameHandler(const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID, WTF::CompletionHandler<void(bool hasAccess)>&& callback);
127
    void hasStorageAccessForFrameHandler(const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID, WTF::CompletionHandler<void(bool hasAccess)>&& callback);
128
    void getAllStorageAccessEntries(CompletionHandler<void(Vector<String>&& domains)>&&);
128
    void getAllStorageAccessEntries(CompletionHandler<void(Vector<String>&& domains)>&&);
129
    void grantStorageAccessHandler(const String& resourceDomain, const String& firstPartyDomain, std::optional<uint64_t> frameID, uint64_t pageID, WTF::CompletionHandler<void(bool wasGranted)>&& callback);
129
    void grantStorageAccessHandler(const String& resourceDomain, const String& firstPartyDomain, std::optional<uint64_t> frameID, uint64_t pageID, WTF::CompletionHandler<void(bool wasGranted)>&& callback);
130
    void removeAllStorageAccessHandler();
130
    void removePrevalentDomains(const Vector<String>& domains);
131
    void removePrevalentDomains(const Vector<String>& domains);
131
    void hasStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, WTF::CompletionHandler<void (bool)>&& callback);
132
    void hasStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, WTF::CompletionHandler<void (bool)>&& callback);
132
    void requestStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, WTF::CompletionHandler<void (bool)>&& callback);
133
    void requestStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, WTF::CompletionHandler<void (bool)>&& callback);

Return to Bug 183641