Minor changes to IPC layer in preparation for Win port.

This CL doesn't introduce any major change (neither on
Windows nor on Linux). It mainly refactor the codebase
to make the Windows IPC cls easier to review:
- Rename the GN target platform_posix to platform_impl
  (Soon the same target will have a platform_windows.cc)
- Add a platform_unittest to cover the platform TLS logic.
- Refactor ThreadTaskRunner to directly expose a TaskRunner
  interface (soon platform_windows.cc will need it as well).
- Refactor a bunch of places to take a ScopedSocketHandle
  rather than a ScopedFile. They are the same type on POSIX
  but not on Windows (where the latter wraps a SOCKET).
- Remove the fd() argument from the base SharedMemory class.
  That makes sense only on POSIX and it caused a lot of empty
  implementation around (note: this will cause a Chromium
  roll failure, we need to match the removal in .MojoSharedMemory)
- Minor other tweaks to get rid of platform-specific includes.

Bug: 174454879
Test: manual on Windows.
Change-Id: Iead1ec87213c56fd3bb170c72d482f71fa33e7e3
46 files changed
tree: 026af5c0fd2288ba66eb0f81f43d4520f76ff873
  1. .github/
  2. bazel/
  3. build_overrides/
  4. buildtools/
  5. debian/
  6. docs/
  7. examples/
  8. gn/
  9. include/
  10. infra/
  11. protos/
  12. src/
  13. test/
  14. tools/
  15. ui/
  16. .clang-format
  17. .clang-tidy
  18. .gitignore
  19. .gn
  20. .style.yapf
  21. Android.bp
  22. Android.bp.extras
  23. BUILD
  24. BUILD.extras
  25. BUILD.gn
  26. CHANGELOG
  27. codereview.settings
  28. heapprofd.rc
  29. LICENSE
  30. METADATA
  31. MODULE_LICENSE_APACHE2
  32. OWNERS
  33. perfetto.rc
  34. PRESUBMIT.py
  35. README.chromium
  36. README.md
  37. TEST_MAPPING
  38. traced_perf.rc
  39. WORKSPACE
README.md

Perfetto - System profiling, app tracing and trace analysis

Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.

See https://perfetto.dev/docs or the /docs/ directory for documentation.