Escape name and category of trace events.

Some calls to trace an event pass a source location as name
(e.g. in BeginFrameTracker::Start). On Windows, these location paths are
separated by backslashes which were not escaped when saving as JSON.
This lead to unparsable trace files created by chrome://tracing.

R=primiano@chromium.org
BUG=599176
TEST=TraceEventTestFixture.NameAndCategoryEscapedIfNeeded

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

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


CrOS-Libchrome-Original-Commit: c3074fbaf4ed55a4ebae511cb2bc943d0af532f9
2 files changed
tree: e244557bb00b6e9ce7c89e998c88a5b44beda2d1
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/