Modified: trunk/Source/WebKit/ChangeLog (242408 => 242409)
--- trunk/Source/WebKit/ChangeLog 2019-03-05 04:22:08 UTC (rev 242408)
+++ trunk/Source/WebKit/ChangeLog 2019-03-05 04:24:44 UTC (rev 242409)
@@ -1,3 +1,19 @@
+2019-03-04 Fujii Hironori <hironori.fu...@sony.com>
+
+ Use a SQLite database to hold the ResourceLoadStatistics data
+ https://bugs.webkit.org/show_bug.cgi?id=194867
+ <rdar://problem/24240854>
+
+ Unreviewed build fix for WinCairo.
+
+ ResourceLoadStatisticsDebug and RELEASE_LOG_INFO_IF are not
+ defined because WinCairo port defines RELEASE_LOG_DISABLED.
+
+ * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
+ (WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess): Enclosed RELEASE_LOG_INFO_IF with #if !RELEASE_LOG_DISABLED.
+ (WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccessUnderOpener): Ditto.
+ (WebKit::ResourceLoadStatisticsDatabaseStore::updateCookieBlocking): Ditto.
+
2019-03-04 Brent Fulgham <bfulg...@apple.com>
Use a SQLite database to hold the ResourceLoadStatistics data
Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp (242408 => 242409)
--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp 2019-03-05 04:22:08 UTC (rev 242408)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp 2019-03-05 04:24:44 UTC (rev 242409)
@@ -734,12 +734,16 @@
switch (cookieTreatmentForOrigin(subFrameDomain)) {
case CookieTreatmentResult::BlockAndPurge: {
+#if !RELEASE_LOG_DISABLED
RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ResourceLoadStatisticsDebug, "Cannot grant storage access to %{public}s since its cookies are blocked in third-party contexts and it has not received user interaction as first-party.", subFrameDomain.string().utf8().data());
+#endif
completionHandler(StorageAccessStatus::CannotRequestAccess);
}
return;
case CookieTreatmentResult::BlockAndKeep: {
+#if !RELEASE_LOG_DISABLED
RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ResourceLoadStatisticsDebug, "No need to grant storage access to %{public}s since its cookies are not blocked in third-party contexts.", subFrameDomain.string().utf8().data());
+#endif
completionHandler(StorageAccessStatus::HasAccess);
}
return;
@@ -750,13 +754,17 @@
auto userWasPromptedEarlier = promptEnabled && hasUserGrantedStorageAccessThroughPrompt(subFrameStatus.second, topFrameDomain);
if (promptEnabled && !userWasPromptedEarlier) {
+#if !RELEASE_LOG_DISABLED
RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ResourceLoadStatisticsDebug, "About to ask the user whether they want to grant storage access to %{public}s under %{public}s or not.", subFrameDomain.string().utf8().data(), topFrameDomain.string().utf8().data());
+#endif
completionHandler(StorageAccessStatus::RequiresUserPrompt);
return;
}
+#if !RELEASE_LOG_DISABLED
if (userWasPromptedEarlier)
RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ResourceLoadStatisticsDebug, "Storage access was granted to %{public}s under %{public}s.", subFrameDomain.string().utf8().data(), topFrameDomain.string().utf8().data());
+#endif
SQLiteStatement incrementStorageAccess(m_database, makeString("UPDATE ObservedDomains SET timesAccessedAsFirstPartyDueToStorageAccessAPI = timesAccessedAsFirstPartyDueToStorageAccessAPI + 1 WHERE domainID = ", String::number(subFrameStatus.second)));
if (incrementStorageAccess.prepare() != SQLITE_OK
@@ -783,7 +791,9 @@
if (cookieTreatmentForOrigin(domainInNeedOfStorageAccess) != CookieTreatmentResult::Allow)
return;
+#if !RELEASE_LOG_DISABLED
RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ResourceLoadStatisticsDebug, "[Temporary combatibility fix] Storage access was granted for %{public}s under opener page from %{public}s, with user interaction in the opened window.", domainInNeedOfStorageAccess.string().utf8().data(), openerDomain.string().utf8().data());
+#endif
grantStorageAccessInternal(WTFMove(domainInNeedOfStorageAccess), WTFMove(openerDomain), WTF::nullopt, openerPageID, false, [](bool) { });
}
@@ -861,7 +871,9 @@
ensureResourceStatisticsForRegistrableDomain(debugManualPrevalentResource());
setPrevalentResource(debugManualPrevalentResource(), ResourceLoadPrevalence::High);
primaryDomainsToBlock.uncheckedAppend(debugManualPrevalentResource());
+#if !RELEASE_LOG_DISABLED
RELEASE_LOG_INFO(ResourceLoadStatisticsDebug, "Did set %{public}s as prevalent resource for the purposes of ITP Debug Mode.", debugManualPrevalentResource().string().utf8().data());
+#endif
}
return primaryDomainsToBlock;
@@ -1351,7 +1363,9 @@
completionHandler();
if (!weakThis)
return;
+#if !RELEASE_LOG_DISABLED
RELEASE_LOG_INFO_IF(weakThis->debugLoggingEnabled(), ResourceLoadStatisticsDebug, "Done updating cookie blocking.");
+#endif
});
});
});