base: Remove custom locking from logging.
logging.cc locks the log file on POSIX, using either a global pthread_mutex_t, or a global base::internal::LockImpl. They are backed by the same OS primitive, as base::internal::LockImpl wraps pthread_mutex_t, so we can use base::internal::LockImpl everywhere. LockImpl is used instead of Lock as it is said that Lock uses logging internally. This is equally true for LockImpl (through a DCHECK()), so there is no reason to not use base::Lock directly. Finally, now that we have C++ local statics, use these to simplify the code. Change-Id: Ibc0dfbad61ebac27301d7aae0bc1cf8357ec4de0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2282760Reviewed-by:Nico Weber <thakis@chromium.org> Commit-Queue: Benoit L <lizeb@chromium.org> Cr-Commit-Position: refs/heads/master@{#785784}
Showing
Please register or sign in to comment