[tracing] Fix races in TraceLog's EnabledStateObserver

This CL makes TraceLog Add/RemoveEnabledStateObserver thread safe
as observers can be registered on different threads.
Furthermore this CL fixes another race in
ChildMemoryDumpManagerDelegateImpl, ensuring that the check to
post the memory dump request on the right thread is itself
thread-safe.

BUG=530578

Review URL: https://codereview.chromium.org/1348613006

Cr-Commit-Position: refs/heads/master@{#349176}


CrOS-Libchrome-Original-Commit: 74188c63d45324feb6a3abbc36fff1affd322801
1 file changed
tree: 777e2b858cafb9fddb9c99e7b78525ebbc8879d5
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/