arc: Persist stability metrics into local state

In case of a crash, metrics from previous session is not available when
generating initial stability logs, which is probably why aggregated
crash counts on UMA don't have ARC state associated.

This patch introduces StabilityMetricsManager, which persists stability
metrics into local state and record value from local state to UMA when

Bug: 929583
Change-Id: I747493f2462454baa7fc187421932ea71d52c9a1
Commit-Queue: Shao-Chuan Lee <>
Reviewed-by: Hidehiko Abe <>
Reviewed-by: Yury Khmel <>
Reviewed-by: Mark Pearson <>
Reviewed-by: Lei Zhang <>
Reviewed-by: Gabriel Charette <>
Cr-Commit-Position: refs/heads/master@{#637591}
19 files changed