• Xi Cheng's avatar
    Upgrade image file management for Win 10 native notification · b011ab56
    Xi Cheng authored
    This CL makes the following changes:
    1) Change to run image folder cleanup after Chrome startup using a background
       task, rather than running it at Chrome shutdown using a high priority task.
    2) Retain the image folder to avoid deleting and creating it repeatedly.
    3) Remove <subdir> from the full path for the temp file, which is unnecessary.
    4) Delete the temp files in batch.
    
    These changes have the following benefits:
    1) Fix the issue of Chrome shutdown being blocked by image file IO for some users
       as in the current implementation.
    2) Save some disk IO related to the sub-directories in the image folder and the
       image folder itself.
    3) Avoid creating a deletion task for each file, otherwise the overhead can be
       large when there is a steady stream of notifications coming rapidly.
    
    Bug: 888276
    Change-Id: I214680aa00bd7f19e84e207e82ada553583a094b
    Reviewed-on: https://chromium-review.googlesource.com/c/1260498
    Commit-Queue: Xi Cheng <chengx@chromium.org>
    Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
    Reviewed-by: default avatarGreg Thompson <grt@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#601227}
    b011ab56
mock_notification_image_retainer.h 1.12 KB