Changeset 259693 in webkit
- Timestamp:
- Apr 7, 2020 5:34:20 PM (4 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r259688 r259693 1 2020-04-07 John Wilander <wilander@apple.com> 2 3 ITP Debug Mode logs should be more generic now that it blocks all third-party cookies by default 4 https://bugs.webkit.org/show_bug.cgi?id=210133 5 <rdar://problem/61399686> 6 7 Reviewed by Brent Fulgham. 8 9 No new tests. Just a change of logging. 10 11 * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: 12 (WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking): 13 Now logs if either vector has entries and uses more generic language. 14 * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: 15 (WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking): 16 Now logs if either vector has entries and uses more generic language. 17 * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp: 18 (WebKit::ResourceLoadStatisticsStore::debugLogDomainsInBatches): 19 Removed hard-coded references to third-party cookie blocking and parameterized it instead. 20 1 21 2020-04-07 Joonghun Park <jh718.park@samsung.com> 2 22 -
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp
r259516 r259693 2273 2273 RegistrableDomainsToBlockCookiesFor domainsToBlock { domainsToBlockAndDeleteCookiesFor, domainsToBlockButKeepCookiesFor, domainsWithUserInteractionAsFirstParty }; 2274 2274 2275 if (debugLoggingEnabled() && !domainsToBlockAndDeleteCookiesFor.isEmpty() && !domainsToBlockButKeepCookiesFor.isEmpty())2276 debugLogDomainsInBatches(" block", domainsToBlock);2275 if (debugLoggingEnabled() && (!domainsToBlockAndDeleteCookiesFor.isEmpty() || !domainsToBlockButKeepCookiesFor.isEmpty())) 2276 debugLogDomainsInBatches("Applying cross-site tracking restrictions", domainsToBlock); 2277 2277 2278 2278 RunLoop::main().dispatch([weakThis = makeWeakPtr(*this), store = makeRef(store()), domainsToBlock = crossThreadCopy(domainsToBlock), completionHandler = WTFMove(completionHandler)] () mutable { … … 2285 2285 2286 2286 if (UNLIKELY(weakThis->debugLoggingEnabled())) { 2287 RELEASE_LOG_INFO(ITPDebug, "Done updating cookie blocking.");2288 weakThis->debugBroadcastConsoleMessage(MessageSource::ITPDebug, MessageLevel::Info, "[ITP] Done updating cookie blocking."_s);2287 RELEASE_LOG_INFO(ITPDebug, "Done applying cross-site tracking restrictions."); 2288 weakThis->debugBroadcastConsoleMessage(MessageSource::ITPDebug, MessageLevel::Info, "[ITP] Done applying cross-site tracking restrictions."_s); 2289 2289 } 2290 2290 }); -
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp
r259516 r259693 873 873 RegistrableDomainsToBlockCookiesFor domainsToBlock { domainsToBlockAndDeleteCookiesFor, domainsToBlockButKeepCookiesFor, domainsWithUserInteractionAsFirstParty }; 874 874 875 if (debugLoggingEnabled() && !domainsToBlockAndDeleteCookiesFor.isEmpty() && !domainsToBlockButKeepCookiesFor.isEmpty())876 debugLogDomainsInBatches(" block", domainsToBlock);875 if (debugLoggingEnabled() && (!domainsToBlockAndDeleteCookiesFor.isEmpty() || !domainsToBlockButKeepCookiesFor.isEmpty())) 876 debugLogDomainsInBatches("Applying cross-site tracking restrictions", domainsToBlock); 877 877 878 878 RunLoop::main().dispatch([weakThis = makeWeakPtr(*this), store = makeRef(store()), domainsToBlock = crossThreadCopy(domainsToBlock), completionHandler = WTFMove(completionHandler)] () mutable { … … 885 885 886 886 if (UNLIKELY(weakThis->debugLoggingEnabled())) { 887 RELEASE_LOG_INFO(ITPDebug, "Done updating cookie blocking.");888 weakThis->debugBroadcastConsoleMessage(MessageSource::ITPDebug, MessageLevel::Info, "[ITP] Done updating cookie blocking."_s);887 RELEASE_LOG_INFO(ITPDebug, "Done applying cross-site tracking restrictions."); 888 weakThis->debugBroadcastConsoleMessage(MessageSource::ITPDebug, MessageLevel::Info, "[ITP] Done applying cross-site tracking restrictions."_s); 889 889 } 890 890 }); -
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp
r259293 r259693 605 605 void ResourceLoadStatisticsStore::debugLogDomainsInBatches(const char* action, const RegistrableDomainsToBlockCookiesFor& domainsToBlock) 606 606 { 607 ASSERT(debugLoggingEnabled()); 608 607 609 Vector<RegistrableDomain> domains; 608 610 domains.appendVector(domainsToBlock.domainsToBlockAndDeleteCookiesFor); … … 611 613 return; 612 614 613 debugBroadcastConsoleMessage(MessageSource::ITPDebug, MessageLevel::Info, makeString("[ITP] About to "_s, action, "cookies in third-party contexts for: ["_s, domainsToString(domains), "]."_s));615 debugBroadcastConsoleMessage(MessageSource::ITPDebug, MessageLevel::Info, makeString("[ITP] "_s, action, " to: ["_s, domainsToString(domains), "]."_s)); 614 616 615 617 static const auto maxNumberOfDomainsInOneLogStatement = 50; 616 618 617 619 if (domains.size() <= maxNumberOfDomainsInOneLogStatement) { 618 RELEASE_LOG_INFO(ITPDebug, " About to %" PUBLIC_LOG_STRING " cookies in third-party contexts for: %" PUBLIC_LOG_STRING ".", action, domainsToString(domains).utf8().data());620 RELEASE_LOG_INFO(ITPDebug, "%" PUBLIC_LOG_STRING " to: %" PUBLIC_LOG_STRING ".", action, domainsToString(domains).utf8().data()); 619 621 return; 620 622 } … … 627 629 for (auto& domain : domains) { 628 630 if (batch.size() == maxNumberOfDomainsInOneLogStatement) { 629 RELEASE_LOG_INFO(ITPDebug, " About to %" PUBLIC_LOG_STRING " cookies in third-party contexts for(%{public}d of %u): %" PUBLIC_LOG_STRING ".", action, batchNumber, numberOfBatches, domainsToString(batch).utf8().data());631 RELEASE_LOG_INFO(ITPDebug, "%" PUBLIC_LOG_STRING " to (%{public}d of %u): %" PUBLIC_LOG_STRING ".", action, batchNumber, numberOfBatches, domainsToString(batch).utf8().data()); 630 632 batch.shrink(0); 631 633 ++batchNumber; … … 634 636 } 635 637 if (!batch.isEmpty()) 636 RELEASE_LOG_INFO(ITPDebug, " About to %" PUBLIC_LOG_STRING " cookies in third-party contexts for(%{public}d of %u): %" PUBLIC_LOG_STRING ".", action, batchNumber, numberOfBatches, domainsToString(batch).utf8().data());638 RELEASE_LOG_INFO(ITPDebug, "%" PUBLIC_LOG_STRING " to (%{public}d of %u): %" PUBLIC_LOG_STRING ".", action, batchNumber, numberOfBatches, domainsToString(batch).utf8().data()); 637 639 } 638 640
Note: See TracChangeset
for help on using the changeset viewer.