• Mike Dougherty's avatar
    [iOS] Attach breadcrumbs to breakpad crash reports · b0e1d90a
    Mike Dougherty authored
    Breadcrumbs need to be attached to crash reports before upload. Ideally,
    |BreadcrumbPersistentStorageKeyedService| instances would store
    breadcrumbs associated with each browser state in their respective
    storage directories. However, this would then require using
    |BreadcrumbController setParametersToAddAtUploadTime:| which must be
    called before breakpad is started and the state of the
    |kLogBreadcrumbs| feature flag is not yet available for use before
    breakpad is started. Attaching breadcrumbs in this way would also
    require merging and sorting multiple breadcrumb files during the primary
    launch flow of the application which may impact time to cold launch
    performance.
    
    Therefore, in order to attach beadcrumb events to breakpad crash logs,
    create a |CrashReporterBreadcrumbObserver| crash report helper object.
    Although it is not ideal that this object is a singleton, it follows
    the pattern of other similar classes defined in crash_report_helper.mm.
    The class was added to its own file to allow for the creation of some
    minimal unittests. In order to support this class a
    BreadcrumbManagerObserverBridge was added. This process can be improved
    once crashpad is adopted as it supports upload streaming of files on
    disk.
    
    Bug: 1003922
    Change-Id: I9eb21d390a27a0c69e64397fbb82cabcc1ea2979
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1979449Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
    Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#727289}
    b0e1d90a
breakpad_helper.h 6.34 KB