• Olivier Robin's avatar
    Fix Safe mode breakpad preferences check · 981689d0
    Olivier Robin authored
    The previous implementation of CacheUploadingEnabled was really
    ambiguous in multiple ways:
    - it is set to match the current status of the breakpad upload
    (which for example is disable on background) and it is used as
    a cache of the user preference.
    - it sets a UserDefault to be reused in the next startup early
    part but it relies on the startup sequence anyway to initialize
    it.
    
    The result is that there are multiple buggy scenarios, like
    killing the app in the background (while breakpad is not running)
    then crash looping.
    
    This CL simplifies the logic by caching the user preference only,
    independently to the actual status of breakpad_upload (which is
    not relevant on next startup).
    
    Bug: 948178
    Tbr: rohitrao
    Change-Id: Ib43dac8e9de4a6fe4c663714bb32fefcdce0a354
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1561121
    Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
    Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#652182}
    981689d0
breakpad_helper.mm 13.5 KB