base/trace_event: Remove spaces from tracing category names

As a part of switching to the Perfetto-based trace macro implementation,
we want to disallow spaces in tracing category names. This patch
replaces spaces with underscores in all current category names.

Bug: 1006541
Cq-Include-Trybots: luci.chromium.try:linux-perfetto-rel
Change-Id: Ia07b1aa54077387611a5f91167a4f2eba2a9da17
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2678950
Auto-Submit: Sami Kyöstilä <[email protected]>
Commit-Queue: Dan Sanders <[email protected]>
Reviewed-by: Bill Budge <[email protected]>
Reviewed-by: Dan Sanders <[email protected]>
Reviewed-by: Mikhail Khokhlov <[email protected]>
Cr-Commit-Position: refs/heads/master@{#851853}
diff --git a/ppapi/proxy/plugin_resource.cc b/ppapi/proxy/plugin_resource.cc
index 7128318..7ab0463 100644
--- a/ppapi/proxy/plugin_resource.cc
+++ b/ppapi/proxy/plugin_resource.cc
@@ -49,9 +49,9 @@
 void PluginResource::OnReplyReceived(
     const proxy::ResourceMessageReplyParams& params,
     const IPC::Message& msg) {
-  TRACE_EVENT2("ppapi proxy", "PluginResource::OnReplyReceived",
-               "Class", IPC_MESSAGE_ID_CLASS(msg.type()),
-               "Line", IPC_MESSAGE_ID_LINE(msg.type()));
+  TRACE_EVENT2("ppapi_proxy", "PluginResource::OnReplyReceived", "Class",
+               IPC_MESSAGE_ID_CLASS(msg.type()), "Line",
+               IPC_MESSAGE_ID_LINE(msg.type()));
   // Grab the callback for the reply sequence number and run it with |msg|.
   CallbackMap::iterator it = callbacks_.find(params.sequence());
   if (it == callbacks_.end()) {
@@ -88,9 +88,9 @@
 }
 
 void PluginResource::SendCreate(Destination dest, const IPC::Message& msg) {
-  TRACE_EVENT2("ppapi proxy", "PluginResource::SendCreate",
-               "Class", IPC_MESSAGE_ID_CLASS(msg.type()),
-               "Line", IPC_MESSAGE_ID_LINE(msg.type()));
+  TRACE_EVENT2("ppapi_proxy", "PluginResource::SendCreate", "Class",
+               IPC_MESSAGE_ID_CLASS(msg.type()), "Line",
+               IPC_MESSAGE_ID_LINE(msg.type()));
   if (dest == RENDERER) {
     DCHECK(!sent_create_to_renderer_);
     sent_create_to_renderer_ = true;
@@ -118,9 +118,9 @@
 }
 
 void PluginResource::Post(Destination dest, const IPC::Message& msg) {
-  TRACE_EVENT2("ppapi proxy", "PluginResource::Post",
-               "Class", IPC_MESSAGE_ID_CLASS(msg.type()),
-               "Line", IPC_MESSAGE_ID_LINE(msg.type()));
+  TRACE_EVENT2("ppapi_proxy", "PluginResource::Post", "Class",
+               IPC_MESSAGE_ID_CLASS(msg.type()), "Line",
+               IPC_MESSAGE_ID_LINE(msg.type()));
   ResourceMessageCallParams params(pp_resource(), GetNextSequence());
   SendResourceCall(dest, params, msg);
 }
@@ -146,9 +146,9 @@
     const IPC::Message& msg,
     IPC::Message* reply,
     ResourceMessageReplyParams* reply_params) {
-  TRACE_EVENT2("ppapi proxy", "PluginResource::GenericSyncCall",
-               "Class", IPC_MESSAGE_ID_CLASS(msg.type()),
-               "Line", IPC_MESSAGE_ID_LINE(msg.type()));
+  TRACE_EVENT2("ppapi_proxy", "PluginResource::GenericSyncCall", "Class",
+               IPC_MESSAGE_ID_CLASS(msg.type()), "Line",
+               IPC_MESSAGE_ID_LINE(msg.type()));
   ResourceMessageCallParams params(pp_resource(), GetNextSequence());
   params.set_has_callback();
   bool success = GetSender(dest)->Send(new PpapiHostMsg_ResourceSyncCall(