• Michael Bai's avatar
    Make ContentCapture ready for experiment · 564da6d9
    Michael Bai authored
    Currently the triggering of ContentCapture is unpredictable, it is
    hard for us to get the unbiased result for the UserActivatedDelay
    experiment.
    
    This patch adds an ExperimentContentCaptureConsumer which triggers
    the ContentCapture independently and is enabled by default.
    
    The allow list check is moved to consumer if the experiment
    is enabled.
    
    As ContentCapture is potentially used for all Android versions,
    we plan to run the experiment for all of them.
    
    This mechanism will also be used for future experiments.
    
    This patch hasn't supported multiple consumers yet.
    
    Test: Added new tests and pass the existing tests
    
    Bug: 1114819, 1119663
    Change-Id: I72e0b991767329caec37080caae2d5c2a9068eaf
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2368104
    Commit-Queue: Tao Bai <michaelbai@chromium.org>
    Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
    Reviewed-by: default avatarChangwan Ryu <changwan@chromium.org>
    Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#801672}
    564da6d9
content_capture_controller.cc 3.26 KB