• Bo Liu's avatar
    android: Fix inputs into CrashDumpObserver · e9624612
    Bo Liu authored
    Overall goal is to switch Crash related classes on Android to use
    content::ChildProcessTerminationInfo, which has more relevant
    termination information than is currently available.
    
    This is a set of related changes / fixes in order to make intentions and
    behaviors on Android clearer.
    
    * Change BrowserChildProcessHostImpl::OnChildDisconnected to always call
      BrowserChildProcessKilled (and BrowserChildProcessHostDelegate
      OnProcessCrashed), and explicitly document this behavior. This is
      because Android cannot distinguish between crashes and kills, and
      basing this decision on whether there was oom protection makes very
      little sense. Generally base::TerminationStatus does not convey much
      information.
      One concrete behavior change is that BrowserChildProcessKilled (and
      OnProcessCrashed) will now be called even when chrome app is in the
      background.
    * Corresponding to above, have CrashDumpObserver listen to
      BrowserChildProcessKilled instead of BrowserChildProcessCrashed.
      Crashed was never called anyway. Listening to Killed allows populating
      additional termination info.
    * Stop using base::TerminationStatus in crash, and use bool
      was_oom_protected_status instead, which is the only useful bit of
      information conveyed by TerminationStatus on Android.
      This also forces code to stop abusing other values of
      TerminationStatus for other purposes, ie added an explicit bool
      normal_exit instead of relying on NORMAL_EXIT.
    * FastShutdownStarted case is treated as a normal exit. Previously it
      was treated as a "normal crash", although with other fields
      unpopulated.
    
    components/data_reduction_proxy TBR
    TBR=tbansal@chromium.org
    
    Bug: 693484
    Change-Id: I887dcff000ccbc38bbb9e4159c1c5bb27a0c8876
    Reviewed-on: https://chromium-review.googlesource.com/1025042
    Commit-Queue: Bo <boliu@chromium.org>
    Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
    Reviewed-by: default avatarMaria Khomenko <mariakhomenko@chromium.org>
    Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
    Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#554581}
    e9624612
compositor_view.cc 9.57 KB