Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Unified Diff: src/inspector/string-util.h

Issue 2660503002: Adapt StringBuilder's append and toString methods via StringUtil helper. (Closed)
Patch Set: Corrected the revision number... :-/ Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/inspector_protocol/README.v8 » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/string-util.h
diff --git a/src/inspector/string-util.h b/src/inspector/string-util.h
index c484aab2edf6326a44953d02d32de26149ae7523..1936c11d0061c75bdf4867c007d61bb28f015ece 100644
--- a/src/inspector/string-util.h
+++ b/src/inspector/string-util.h
@@ -33,9 +33,21 @@ class StringUtil {
}
static String fromDouble(double number) { return String::fromDouble(number); }
static const size_t kNotFound = String::kNotFound;
+ static void builderAppend(StringBuilder& builder, const String& s) {
+ builder.append(s);
+ }
+ static void builderAppend(StringBuilder& builder, UChar c) {
+ builder.append(c);
+ }
+ static void builderAppend(StringBuilder& builder, const char* s, size_t len) {
+ builder.append(s, len);
+ }
static void builderReserve(StringBuilder& builder, size_t capacity) {
builder.reserveCapacity(capacity);
}
+ static String builderToString(StringBuilder& builder) {
+ return builder.toString();
+ }
static std::unique_ptr<protocol::Value> parseJSON(const String16& json);
static std::unique_ptr<protocol::Value> parseJSON(const StringView& json);
};
« no previous file with comments | « no previous file | third_party/inspector_protocol/README.v8 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698