Diff
Modified: trunk/Source/WebKit/ChangeLog (281880 => 281881)
--- trunk/Source/WebKit/ChangeLog 2021-09-01 21:49:04 UTC (rev 281880)
+++ trunk/Source/WebKit/ChangeLog 2021-09-01 22:25:22 UTC (rev 281881)
@@ -1,3 +1,32 @@
+2021-09-01 Alex Christensen <[email protected]>
+
+ Remove _statisticsDatabaseColumnsForTable and related unused test functions
+ https://bugs.webkit.org/show_bug.cgi?id=229771
+
+ Reviewed by Kate Cheney.
+
+ This removes some code that was used for tests until r281779
+
+ * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
+ (WebKit::ResourceLoadStatisticsDatabaseStore::columnsForTable): Deleted.
+ * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
+ * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
+ (WebKit::WebResourceLoadStatisticsStore::statisticsDatabaseColumnsForTable): Deleted.
+ * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
+ * NetworkProcess/NetworkProcess.cpp:
+ (WebKit::NetworkProcess::statisticsDatabaseColumnsForTable): Deleted.
+ * NetworkProcess/NetworkProcess.h:
+ * NetworkProcess/NetworkProcess.messages.in:
+ * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
+ (-[WKWebsiteDataStore _statisticsDatabaseColumnsForTable:completionHandler:]): Deleted.
+ * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
+ * UIProcess/Network/NetworkProcessProxy.cpp:
+ (WebKit::NetworkProcessProxy::statisticsDatabaseColumnsForTable): Deleted.
+ * UIProcess/Network/NetworkProcessProxy.h:
+ * UIProcess/WebsiteData/WebsiteDataStore.cpp:
+ (WebKit::WebsiteDataStore::statisticsDatabaseColumnsForTable): Deleted.
+ * UIProcess/WebsiteData/WebsiteDataStore.h:
+
2021-09-01 David Kilzer <[email protected]>
[WebRTC] Leak or over-release of CFPixelBufferRef returned from webrtc::createPixelBufferFromFrame()
Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp (281880 => 281881)
--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp 2021-09-01 21:49:04 UTC (rev 281880)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp 2021-09-01 22:25:22 UTC (rev 281881)
@@ -566,25 +566,6 @@
deleteTable("AttributedPrivateClickMeasurement");
}
-Vector<String> ResourceLoadStatisticsDatabaseStore::columnsForTable(const String& tableName)
-{
- auto statement = m_database.prepareStatementSlow(makeString("PRAGMA table_info(", tableName, ")"));
-
- if (!statement) {
- RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::getColumnsFromTableInfoStatement Unable to prepare statement to fetch schema for table, error message: %" PRIVATE_LOG_STRING, this, m_database.lastErrorMsg());
- ASSERT_NOT_REACHED();
- return { };
- }
-
- Vector<String> columns;
- while (statement->step() == SQLITE_ROW) {
- auto name = statement->columnText(1);
- columns.append(name);
- }
-
- return columns;
-}
-
void ResourceLoadStatisticsDatabaseStore::addMissingTablesIfNecessary()
{
auto missingTables = checkForMissingTablesInSchema();
Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h (281880 => 281881)
--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h 2021-09-01 21:49:04 UTC (rev 281880)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h 2021-09-01 22:25:22 UTC (rev 281881)
@@ -125,8 +125,6 @@
void insertExpiredStatisticForTesting(const RegistrableDomain&, unsigned numberOfOperatingDaysPassed, bool hasUserInteraction, bool isScheduledForAllButCookieDataRemoval, bool isPrevalent) override;
static void interruptAllDatabases();
- Vector<String> columnsForTable(const String&);
-
private:
void includeTodayAsOperatingDateIfNecessary() override;
void clearOperatingDates() override { }
Modified: trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp (281880 => 281881)
--- trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp 2021-09-01 21:49:04 UTC (rev 281880)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp 2021-09-01 22:25:22 UTC (rev 281881)
@@ -335,23 +335,6 @@
});
}
-void WebResourceLoadStatisticsStore::statisticsDatabaseColumnsForTable(const String& table, CompletionHandler<void(Vector<String>&&)>&& completionHandler)
-{
- ASSERT(RunLoop::isMain());
-
- postTask([this, table = table.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable {
- if (!m_statisticsStore || !is<ResourceLoadStatisticsDatabaseStore>(*m_statisticsStore)) {
- completionHandler({ });
- ASSERT_NOT_REACHED();
- return;
- }
- auto columns = downcast<ResourceLoadStatisticsDatabaseStore>(*m_statisticsStore).columnsForTable(table);
- postTaskReply([columns = WTFMove(columns), completionHandler = WTFMove(completionHandler)] () mutable {
- completionHandler(WTFMove(columns));
- });
- });
-}
-
void WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated(Vector<ResourceLoadStatistics>&& statistics, CompletionHandler<void()>&& completionHandler)
{
ASSERT(RunLoop::isMain());
Modified: trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h (281880 => 281881)
--- trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h 2021-09-01 21:49:04 UTC (rev 281880)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h 2021-09-01 22:25:22 UTC (rev 281881)
@@ -189,7 +189,6 @@
void scheduleCookieBlockingUpdateForDomains(const Vector<RegistrableDomain>&, CompletionHandler<void()>&&);
void scheduleStatisticsAndDataRecordsProcessing(CompletionHandler<void()>&&);
void statisticsDatabaseHasAllTables(CompletionHandler<void(bool)>&&);
- void statisticsDatabaseColumnsForTable(const String&, CompletionHandler<void(Vector<String>&&)>&&);
void scheduleClearInMemoryAndPersistent(ShouldGrandfatherStatistics, CompletionHandler<void()>&&);
void scheduleClearInMemoryAndPersistent(WallTime modifiedSince, ShouldGrandfatherStatistics, CompletionHandler<void()>&&);
void clearInMemoryEphemeral(CompletionHandler<void()>&&);
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp (281880 => 281881)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp 2021-09-01 21:49:04 UTC (rev 281880)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp 2021-09-01 22:25:22 UTC (rev 281881)
@@ -774,19 +774,6 @@
}
}
-void NetworkProcess::statisticsDatabaseColumnsForTable(PAL::SessionID sessionID, const String& tableName, CompletionHandler<void(Vector<String>&&)>&& completionHandler)
-{
- if (auto* networkSession = this->networkSession(sessionID)) {
- if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics())
- resourceLoadStatistics->statisticsDatabaseColumnsForTable(tableName, WTFMove(completionHandler));
- else
- completionHandler({ });
- } else {
- ASSERT_NOT_REACHED();
- completionHandler({ });
- }
-}
-
void NetworkProcess::setNotifyPagesWhenDataRecordsWereScanned(PAL::SessionID sessionID, bool value, CompletionHandler<void()>&& completionHandler)
{
if (auto* networkSession = this->networkSession(sessionID)) {
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.h (281880 => 281881)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.h 2021-09-01 21:49:04 UTC (rev 281880)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.h 2021-09-01 22:25:22 UTC (rev 281881)
@@ -244,7 +244,6 @@
void scheduleCookieBlockingUpdate(PAL::SessionID, CompletionHandler<void()>&&);
void scheduleStatisticsAndDataRecordsProcessing(PAL::SessionID, CompletionHandler<void()>&&);
void statisticsDatabaseHasAllTables(PAL::SessionID, CompletionHandler<void(bool)>&&);
- void statisticsDatabaseColumnsForTable(PAL::SessionID, const String&, CompletionHandler<void(Vector<String>&&)>&&);
void setCacheMaxAgeCapForPrevalentResources(PAL::SessionID, Seconds, CompletionHandler<void()>&&);
void setGrandfatheringTime(PAL::SessionID, Seconds, CompletionHandler<void()>&&);
void setLastSeen(PAL::SessionID, const RegistrableDomain&, Seconds, CompletionHandler<void()>&&);
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in (281880 => 281881)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in 2021-09-01 21:49:04 UTC (rev 281880)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in 2021-09-01 22:25:22 UTC (rev 281881)
@@ -108,7 +108,6 @@
ScheduleCookieBlockingUpdate(PAL::SessionID sessionID) -> () Async
ScheduleStatisticsAndDataRecordsProcessing(PAL::SessionID sessionID) -> () Async
StatisticsDatabaseHasAllTables(PAL::SessionID sessionID) -> (bool hasAllTables) Async
- StatisticsDatabaseColumnsForTable(PAL::SessionID sessionID, String tableName) -> (Vector<String> columns) Async
SetCacheMaxAgeCapForPrevalentResources(PAL::SessionID sessionID, Seconds seconds) -> () Async
SetGrandfathered(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain, bool isGrandfathered) -> () Async
GetResourceLoadStatisticsDataSummary(PAL::SessionID sessionID) -> (Vector<WebKit::WebResourceLoadStatisticsStore::ThirdPartyData> thirdPartyData) Async
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm (281880 => 281881)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm 2021-09-01 21:49:04 UTC (rev 281880)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm 2021-09-01 22:25:22 UTC (rev 281881)
@@ -577,21 +577,6 @@
#endif
}
-- (void)_statisticsDatabaseColumnsForTable:(NSString *)table completionHandler:(void (^)(NSArray<NSString *> *))completionHandler
-{
-#if ENABLE(RESOURCE_LOAD_STATISTICS)
- _websiteDataStore->statisticsDatabaseColumnsForTable(table, [completionHandler = makeBlockPtr(completionHandler)](auto&& columns) {
- Vector<RefPtr<API::Object>> apiColumns;
- apiColumns.reserveInitialCapacity(columns.size());
- for (auto& column : columns)
- apiColumns.uncheckedAppend(API::String::create(column));
- completionHandler(wrapper(API::Array::create(WTFMove(apiColumns))));
- });
-#else
- completionHandler(nil);
-#endif
-}
-
- (void)_processStatisticsAndDataRecords:(void (^)(void))completionHandler
{
#if ENABLE(RESOURCE_LOAD_STATISTICS)
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h (281880 => 281881)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h 2021-09-01 21:49:04 UTC (rev 281880)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h 2021-09-01 22:25:22 UTC (rev 281881)
@@ -77,7 +77,6 @@
- (void)_isRegisteredAsSubresourceUnderFirstParty:(NSURL *)firstPartyURL thirdParty:(NSURL *)thirdPartyURL completionHandler:(void (^)(BOOL))completionHandler WK_API_AVAILABLE(macos(10.15.4), ios(13.4));
- (void)_setThirdPartyCookieBlockingMode:(BOOL)enabled onlyOnSitesWithoutUserInteraction:(BOOL)onlyOnSitesWithoutUserInteraction completionHandler:(void (^)(void))completionHandler WK_API_AVAILABLE(macos(11.0), ios(14.0));
- (void)_statisticsDatabaseHasAllTables:(void (^)(BOOL))completionHandler WK_API_AVAILABLE(macos(11.0), ios(14.0));
-- (void)_statisticsDatabaseColumnsForTable:(NSString *)table completionHandler:(void (^)(NSArray<NSString *> *))completionHandler WK_API_AVAILABLE(macos(12.0), ios(15.0));
- (void)_processStatisticsAndDataRecords:(void (^)(void))completionHandler WK_API_AVAILABLE(macos(10.15), ios(13.0));
- (void)_appBoundDomains:(void (^)(NSArray<NSString *> *))completionHandler WK_API_AVAILABLE(macos(11.0), ios(14.0));
- (void)_appBoundSchemes:(void (^)(NSArray<NSString *> *))completionHandler WK_API_AVAILABLE(macos(11.0), ios(14.0));
Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (281880 => 281881)
--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp 2021-09-01 21:49:04 UTC (rev 281880)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp 2021-09-01 22:25:22 UTC (rev 281881)
@@ -714,11 +714,6 @@
sendWithAsyncReply(Messages::NetworkProcess::StatisticsDatabaseHasAllTables(sessionID), WTFMove(completionHandler));
}
-void NetworkProcessProxy::statisticsDatabaseColumnsForTable(PAL::SessionID sessionID, const String& tableName, CompletionHandler<void(Vector<String>&&)>&& completionHandler)
-{
- sendWithAsyncReply(Messages::NetworkProcess::StatisticsDatabaseColumnsForTable(sessionID, tableName), WTFMove(completionHandler));
-}
-
void NetworkProcessProxy::logUserInteraction(PAL::SessionID sessionID, const RegistrableDomain& resourceDomain, CompletionHandler<void()>&& completionHandler)
{
if (!canSendMessage()) {
Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h (281880 => 281881)
--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h 2021-09-01 21:49:04 UTC (rev 281880)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h 2021-09-01 22:25:22 UTC (rev 281881)
@@ -150,7 +150,6 @@
void setLastSeen(PAL::SessionID, const RegistrableDomain&, Seconds, CompletionHandler<void()>&&);
void domainIDExistsInDatabase(PAL::SessionID, int domainID, CompletionHandler<void(bool)>&&);
void statisticsDatabaseHasAllTables(PAL::SessionID, CompletionHandler<void(bool)>&&);
- void statisticsDatabaseColumnsForTable(PAL::SessionID, const String&, CompletionHandler<void(Vector<String>&&)>&&);
void mergeStatisticForTesting(PAL::SessionID, const RegistrableDomain&, const TopFrameDomain& topFrameDomain1, const TopFrameDomain& topFrameDomain2, Seconds lastSeen, bool hadUserInteraction, Seconds mostRecentUserInteraction, bool isGrandfathered, bool isPrevalent, bool isVeryPrevalent, unsigned dataRecordsRemoved, CompletionHandler<void()>&&);
void insertExpiredStatisticForTesting(PAL::SessionID, const RegistrableDomain&, unsigned numberOfOperatingDaysPassed, bool hadUserInteraction, bool isScheduledForAllButCookieDataRemoval, bool isPrevalent, CompletionHandler<void()>&&);
void setAgeCapForClientSideCookies(PAL::SessionID, std::optional<Seconds>, CompletionHandler<void()>&&);
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (281880 => 281881)
--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2021-09-01 21:49:04 UTC (rev 281880)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2021-09-01 22:25:22 UTC (rev 281881)
@@ -1327,12 +1327,6 @@
networkProcess().statisticsDatabaseHasAllTables(m_sessionID, WTFMove(completionHandler));
}
-void WebsiteDataStore::statisticsDatabaseColumnsForTable(const String& tableName, CompletionHandler<void(Vector<String>&&)>&& completionHandler)
-{
- ASSERT(RunLoop::isMain());
- networkProcess().statisticsDatabaseColumnsForTable(m_sessionID, tableName, WTFMove(completionHandler));
-}
-
void WebsiteDataStore::setLastSeen(const URL& url, Seconds seconds, CompletionHandler<void()>&& completionHandler)
{
if (url.protocolIsAbout() || url.isEmpty()) {
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h (281880 => 281881)
--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h 2021-09-01 21:49:04 UTC (rev 281880)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h 2021-09-01 22:25:22 UTC (rev 281881)
@@ -199,7 +199,6 @@
void setLastSeen(const URL&, Seconds, CompletionHandler<void()>&&);
void domainIDExistsInDatabase(int domainID, CompletionHandler<void(bool)>&&);
void statisticsDatabaseHasAllTables(CompletionHandler<void(bool)>&&);
- void statisticsDatabaseColumnsForTable(const String&, CompletionHandler<void(Vector<String>&&)>&&);
void mergeStatisticForTesting(const URL&, const URL& topFrameUrl1, const URL& topFrameUrl2, Seconds lastSeen, bool hadUserInteraction, Seconds mostRecentUserInteraction, bool isGrandfathered, bool isPrevalent, bool isVeryPrevalent, unsigned dataRecordsRemoved, CompletionHandler<void()>&&);
void insertExpiredStatisticForTesting(const URL&, unsigned numberOfOperatingDaysPassed, bool hadUserInteraction, bool isScheduledForAllButCookieDataRemoval, bool isPrevalent, CompletionHandler<void()>&&);
void setNotifyPagesWhenDataRecordsWereScanned(bool, CompletionHandler<void()>&&);
Modified: trunk/Tools/ChangeLog (281880 => 281881)
--- trunk/Tools/ChangeLog 2021-09-01 21:49:04 UTC (rev 281880)
+++ trunk/Tools/ChangeLog 2021-09-01 22:25:22 UTC (rev 281881)
@@ -1,3 +1,12 @@
+2021-09-01 Alex Christensen <[email protected]>
+
+ Remove _statisticsDatabaseColumnsForTable and related unused test functions
+ https://bugs.webkit.org/show_bug.cgi?id=229771
+
+ Reviewed by Kate Cheney.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:
+
2021-09-01 Carlos Alberto Lopez Perez <[email protected]>
Unreviewed, reverting r281870.
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm (281880 => 281881)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm 2021-09-01 21:49:04 UTC (rev 281880)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm 2021-09-01 22:25:22 UTC (rev 281881)
@@ -36,9 +36,6 @@
#import <WebKit/_WKWebsiteDataStoreConfiguration.h>
#import <wtf/RetainPtr.h>
-// FIXME: Remove _statisticsDatabaseColumnsForTable and its infrastructure in another patch.
-// It is no longer needed, but removing it is likely to cause unnecessary merge conflicts.
-
static RetainPtr<WKWebView> webViewWithResourceLoadStatisticsEnabledInNetworkProcess()
{
auto *sharedProcessPool = [WKProcessPool _sharedProcessPool];