• Yao Xiao's avatar
    [floc] Check sync/swaa/nac just for event logging, not for the floc computation. · 2bf4aee1
    Yao Xiao authored
    Why: This is the expected behavior. We should keep calculating and
    serving the floc even if sync/swaa/nac is disabled. Those bits should
    only affect event loggings.
    
    How: Create the FlocEventLogger class for the sync/swaa/nac permission
    checks and the loggings. Removed the checks in the floc_id_provider.
    Given that the sync service is often ready a few moments after the
    browser start, but the floc may already have been computed before then,
    for practical purposes, each logging attempt that fails the initial
    sync-history check will be given a second chance 10 seconds later.
    
    For sync_integration_test: Remove the feature list initialization and
    a test: With the new change, the 1st FLoC event logging will at least
    happen 10 seconds after the profile initialization, so we no longer
    have the previous issue that the FLoC event being logged right after
    sync setup. The removed test is essentially similar to the floc
    browsertests (e.g. FlocIdProviderWithCustomizedServicesBrowserTest.
    FlocIdValue_ImmediateComputeOnStartUp), so we don't need to have
    another test.
    
    
    Bug: 1160317
    Change-Id: Iec357579fb179b2fdc3a327b2089c5a321d109ff
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2597014Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
    Reviewed-by: default avatarRamin Halavati <rhalavati@chromium.org>
    Reviewed-by: default avatarJosh Karlin <jkarlin@chromium.org>
    Commit-Queue: Yao Xiao <yaoxia@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#842109}
    2bf4aee1
BUILD.gn 397 KB