• Ian Barkley-Yeung's avatar
    Install Breakpad when consent is given. · 28b5d7d9
    Ian Barkley-Yeung authored
    Previously, on ChromeOS, Breakpad would only be installed if
    (a) the device owner had already consented to stats collection at the
    time the browser process started up or
    (b) the user consented to stats collection in the OOBE flow.
    
    Extend this to install Breakpad if the user consents to metrics
    collection in the settings menu. Or if a tast test changes consent via
    the autotest private functions.
    
    Consistent with previous behavior, Breakpad is not uninstalled if the
    user revokes consent. Rather, we rely on crash_reporter to discard the
    report in that case.
    
    This change only affects Breakpad. Crashpad is always installed and
    relies on crash_reporter discarding reports if crash collection consent
    is not given.
    
    This only affects ChromeOS.
    
    This change isn't perfect. It only installs Breakpad in the main browser
    process when the user gives consent in the setting screen. Trying to
    install Breakpad in all running processes seems like it would be very
    complex, and Breakpad is being deprecated in favor of Crashpad soon, so
    I'm just fixing the main browser process here.
    
    BUGS=chromium:1058261, chromium:1058258
    
    TEST=Disabled consent in OOBE, logged in, enabled consent on settings
    screen, crashed browser and saw crash files written out.
    TEST=Enabled consent in OOBE, crashed browser before logging in, ensured
    crash files written out
    TEST=tast ... ui.ChromeCrashLoggedIn.browser_breakpad
    
    Fixed: chromium:1058261, chromium:1058258
    Change-Id: I8d2ac65b690790f0396d8a67ce9a0c3af114d69c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2145676
    Commit-Queue: Ian Barkley-Yeung <iby@chromium.org>
    Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#759078}
    28b5d7d9
chrome_browser_main_chromeos.cc 52.2 KB