UiDevToolsClient: Convert incoming messages to CBOR.
We'll be doing away with StringUtil::parseMessage(..., false) which invokes a JSON parser. So, in preparation, I'd like to convert the incoming traffic to CBOR. StringUtil::parseMessage(..., true) will then still make a protocol::Value but using a CBOR parser. Later on, we will be able to extract call_id / method with a shallow parse. So the plan is to have the raw messages be in CBOR format. I did a small amount of cleanup as well to make this easier to read (inlining the conversion, adding a method applying to both sending response and notification). Change-Id: I6659c46f8e59dc15442b08fbf9f9999a2b353986 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1954385Reviewed-by:Leonard Grey <lgrey@chromium.org> Commit-Queue: Johannes Henkel <johannes@chromium.org> Cr-Commit-Position: refs/heads/master@{#722612}
Showing
Please register or sign in to comment