commit | eb49ccc013d304921d419249b955a0bf03905ca6 | [log] [tgz] |
---|---|---|
author | Greg Thompson <grt@chromium.org> | Wed May 16 15:40:31 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed May 16 15:40:31 2018 |
tree | bae18dc6112bb7c7e2ddb225c70f38207a831f02 | |
parent | a014bedd6ebfd86184750134978b873f69ed49b1 [diff] |
Logging tweaks for enrollment token retrieval. This change suppresses error logging when the Policies key does not exist, as this is an acceptable (and expected) condition. This CL also: - Changes from requesting KEY_READ to KEY_QUERY_VALUE rights when opening the Policies key (principle of least privilege). - Removes some misleading wording in the emitted error messages (the call to Open() does not result in the creation of a key, and the call to ReadValue() does not write anything). - Switches to a combination of SetLastError and PLOG so that the log messages contain a human-readable error code. - Shortens the error messages -- the reader can inspect the code given the emitted file+line info if needed. - Removes an early-exit path, as RegKey::ReadValue is documented as not modifying its out param in case of error. BUG=812641,840369 R=rogerta@chromium.org Change-Id: I8990f85a4595b5356196e24167738222653846d2 Reviewed-on: https://chromium-review.googlesource.com/1060058 Reviewed-by: Roger Tawa <rogerta@chromium.org> Commit-Queue: Greg Thompson <grt@chromium.org> Cr-Commit-Position: refs/heads/master@{#559116}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .