Don't attempt to store owner settings when IsOwner() == false
The existing code had a user_id_ check, but that is not sufficient for owner settings writes to go through, the private key must be present as well. Replace the check with a proper IsOwner() check. This misbehavior is only observed in DeviceSettingsServiceTest.Observer, getting exposed by a DCHECK added in [1]. It's hopefully not hit in production (otherwise tentative owner settings might get lost), but better to fix the root cause than avoiding the offending edge case in the test. [1] https://chromium-review.googlesource.com/c/chromium/src/+/2287290/11/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc#800 BUG=chromium:1073940 TEST=unit tests pass Change-Id: I6d5a5f17e8aeaa28600d57c7f0fcfad661434e33 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2611720Reviewed-by:Xiyuan Xia <xiyuan@chromium.org> Commit-Queue: Mattias Nissler <mnissler@chromium.org> Cr-Commit-Position: refs/heads/master@{#840801}
Showing
Please register or sign in to comment