Commit 6f74ed2e authored by Johannes Henkel's avatar Johannes Henkel Committed by Commit Bot

[DevTools] Make Blink's ProtocolMessage a WebVector<uint8_t> for now.

Also we're not creating these any more via StringUtil in blink,
so these two helpers can go.

Change-Id: Id676e4c35bc00392166f00f645178cd17720d02b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1888270
Auto-Submit: Johannes Henkel <johannes@chromium.org>
Reviewed-by: default avatarAndrey Kosyakov <caseq@chromium.org>
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710466}
parent 0e993142
...@@ -58,20 +58,6 @@ std::unique_ptr<protocol::Value> StringUtil::parseJSON(const String& string) { ...@@ -58,20 +58,6 @@ std::unique_ptr<protocol::Value> StringUtil::parseJSON(const String& string) {
string.length()); string.length());
} }
// static
ProtocolMessage StringUtil::jsonToMessage(const String& message) {
ProtocolMessage result;
result.json = message;
return result;
}
// static
ProtocolMessage StringUtil::binaryToMessage(WebVector<uint8_t> message) {
ProtocolMessage result;
result.binary = std::move(message);
return result;
}
// static // static
void StringUtil::builderAppendQuotedString(StringBuilder& builder, void StringUtil::builderAppendQuotedString(StringBuilder& builder,
const String& str) { const String& str) {
......
...@@ -38,11 +38,7 @@ class Value; ...@@ -38,11 +38,7 @@ class Value;
using String = WTF::String; using String = WTF::String;
using StringBuilder = WTF::StringBuilder; using StringBuilder = WTF::StringBuilder;
using ProtocolMessage = WebVector<uint8_t>;
struct ProtocolMessage {
String json;
WebVector<uint8_t> binary;
};
class CORE_EXPORT StringUtil { class CORE_EXPORT StringUtil {
STATIC_ONLY(StringUtil); STATIC_ONLY(StringUtil);
...@@ -83,8 +79,6 @@ class CORE_EXPORT StringUtil { ...@@ -83,8 +79,6 @@ class CORE_EXPORT StringUtil {
return builder.ToString(); return builder.ToString();
} }
static std::unique_ptr<protocol::Value> parseJSON(const String&); static std::unique_ptr<protocol::Value> parseJSON(const String&);
static ProtocolMessage jsonToMessage(const String& message);
static ProtocolMessage binaryToMessage(WebVector<uint8_t> message);
static String fromUTF8(const uint8_t* data, size_t length) { static String fromUTF8(const uint8_t* data, size_t length) {
return String::FromUTF8(reinterpret_cast<const char*>(data), length); return String::FromUTF8(reinterpret_cast<const char*>(data), length);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment