Changeset 276545 in webkit
- Timestamp:
- Apr 23, 2021, 5:47:50 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
NetworkProcess/PrivateClickMeasurementManager.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r276523 r276545 1 2021-04-23 Kate Cheney <katherine_cheney@apple.com> 2 3 PCM: debug mode should send the second report on a 10 second delay after the first 4 https://bugs.webkit.org/show_bug.cgi?id=225010 5 <rdar://problem/77092303> 6 7 Reviewed by John Wilander. 8 9 Fix a bug in PCM debug mode where we don't set the timer for 10_s 10 after sending the first report for an attribution. 11 12 No new tests, this is debug mode only. Non-debug mode behavior is 13 covered by existing tests, and I tested debug mode manually. 14 15 * NetworkProcess/PrivateClickMeasurementManager.cpp: 16 (WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests): 17 If the attribution has been sent to only one endpoint, indicated by 18 a non-null laterTimeToSend value, we should set the timer to be 10 19 seconds if debug mode is enabled. 20 21 Also, change the interval time from 1 minute to 10 seconds, because 22 there was no good reason that it was 1 minute and we should be 23 consistent. Also 1 minute is a long time to wait during a test. 24 1 25 2021-04-23 Commit Queue <commit-queue@webkit.org> 2 26 -
trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.cpp
r276413 r276545 396 396 // We've already sent an attribution this round. We should send additional overdue attributions at 397 397 // a random time between 15 and 30 minutes to avoid a burst of simultaneous attributions. If debug 398 // mode is enabled, this should be every minutefor easy testing.399 auto interval = debugModeEnabled() ? 1_min: 15_min + Seconds(cryptographicallyRandomNumber() % 900);398 // mode is enabled, this should be much shorter for easy testing. 399 auto interval = debugModeEnabled() ? debugModeSecondsUntilSend : 15_min + Seconds(cryptographicallyRandomNumber() % 900); 400 400 startTimer(interval); 401 401 return; … … 408 408 409 409 // Update nextTimeToFire in case the later report time for this attribution is sooner than the scheduled next time to fire. 410 // Or, if debug mode is enabled, we should send the second report on a much shorter delay for easy testing. 410 411 if (laterTimeToSend) 411 nextTimeToFire = std::min(nextTimeToFire, laterTimeToSend.value().secondsSinceEpoch());412 nextTimeToFire = debugModeEnabled() ? debugModeSecondsUntilSend : std::min(nextTimeToFire, laterTimeToSend.value().secondsSinceEpoch()); 412 413 413 414 continue;
Note:
See TracChangeset
for help on using the changeset viewer.