Update binding state before unbinding

Stability.Android.ProcessedCrashCounts has a race issue if a renderer
process is LMK-ed as soon as the process is unbound.

A process being recorded as killed with higher priority binding than
actual makes the metrics unreliable.

We need to update the binding state just after upgrading (i.e. adding)
a binding and just before downgrading (i.e. removing) a binding to
make the metrics reliable.

Bug: 423428589
Change-Id: I166c30c7d2f9aa4037add750227d1e6b2a952e04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6652246
Commit-Queue: Shin Kawamura <kawasin@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1477110}
NOKEYCHECK=True
GitOrigin-RevId: acaba52f57249ece7eaa6946c7676de403fc1693
1 file changed