• Yao Xiao's avatar
    [floc] If finch version param mismatches, invalidate & immediately recompute. · f6e88454
    Yao Xiao authored
    What: Introduce the kFlocIdFinchConfigVersion feature param. On browser
    start, invalidate floc and trigger an immediate recompute if the
    version mismatches with the one when computing the last floc.
    
    Why: This allows us to configure an immediate recompute when we feel
    it's necessary.
    
    How:
    - Add the finch_config_version to FlocId, that allows it to be saved to
    prefs at each computation along with other fields. On browser start,
    check for version mismatch and handle it accordingly.
    - In the InterestCohort string, this version replaces the position of
    the previous constant kChromeFlocIdVersion. We expect most params to go
    through finch in the near future so replacing the "chrome floc version"
    part for now.
    - Also move the compute_time to FlocId, as it's also logically fit
    there, and we can keep the load/save function to one place.
    - Move the floc features to //components as now the it's being checked
    by the components.
    
    Bug: 1159235
    Change-Id: I0c80ed35ac5f181b18b860eb2f1a73acf6fd1432
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2595595Reviewed-by: default avatarJosh Karlin <jkarlin@chromium.org>
    Reviewed-by: default avatarMarc Treib <treib@chromium.org>
    Commit-Queue: Yao Xiao <yaoxia@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#838626}
    f6e88454
chrome_features.cc 39.9 KB