
This adds more annotations to base::Lock. This has ripple effects on the codebase, namely code can now be checked, and is failing the static checker. Depending on the case, either disable thread checking for the function, or add the proper annotations. Thread checking has to be disabled in cases where there is a control-flow dependency on mutex locking. The most common case is where the lock is a pointer, and can be nullptr. While in the neighborhood, fix a few "git cl lint" warnings, mostly "include what you use". Bug: 831825 Change-Id: I66605f5ce1ab7ab35449dab6e120bef844ad9b57 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036003 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Benoit L <lizeb@chromium.org> Cr-Commit-Position: refs/heads/master@{#749086}