[Cleanup] Factor out a class to manage safe mode state.

[email protected]

Bug: 727984
Change-Id: Ic1993cce55beed9e00512f6fe4b001fc5ec4c591
Reviewed-on: https://chromium-review.googlesource.com/818746
Commit-Queue: Ilya Sherman <[email protected]>
Reviewed-by: Alexei Svitkine <[email protected]>
Cr-Commit-Position: refs/heads/master@{#523262}
5 files changed