crash-reporter: Attach Chrome logs to crash reports.

When Chrome crashes, gather the last 20 lines of each of the
latest two log files in /var/log/chrome and
/home/chronos/user/log. Attach them as gzipped metadata
using a "chrome.txt" key name and rename the GPU error state
key to "i915_error_state.log.xz".

(Re-landing after privacy review; originally reviewed at Changes
since previous iteration include attaching the Chrome logs
and the GPU state separately and redirecting stderr to
/dev/null when listing user Chrome log files to avoid log
spam in the not-logged-in case.)

TEST=triggered crashes and verified that logs were included
     in crash reports: b7c4d7f2bee32e2f, 6292f090468fcf28

Change-Id: I1642a8971f1373726e5b0e3977dbfdbcc2aa6667
Commit-Queue: Dan Erat <>
Trybot-Ready: Dan Erat <>
Tested-by: Dan Erat <>
Reviewed-by: Mike Frysinger <>
3 files changed
tree: f34c93072050aec3a65fac0250f3b58f7e9e78bd
  1. crash_reporter/