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

Unified Diff: third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp

Issue 2017053003: Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. Created 4 years, 7 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
Index: third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp
diff --git a/third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp b/third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp
index cd180cd5fcdda495b2c701decdb7f2a324e6c69d..2ef844e0002bb8293133364d89bd6f71d51cc582 100644
--- a/third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp
@@ -46,9 +46,9 @@ void maybeEmitNamedValue(StringBuilder& builder, bool emit, const char* name, T
if (!emit)
return;
if (builder.length() > 1)
- builder.appendLiteral(", ");
+ builder.append(", ");
builder.append(name);
- builder.appendLiteral(": ");
+ builder.append(": ");
builder.appendNumber(value);
}
@@ -57,13 +57,13 @@ void maybeEmitNamedBoolean(StringBuilder& builder, bool emit, const char* name,
if (!emit)
return;
if (builder.length() > 1)
- builder.appendLiteral(", ");
+ builder.append(", ");
builder.append(name);
- builder.appendLiteral(": ");
+ builder.append(": ");
if (value)
- builder.appendLiteral("true");
+ builder.append("true");
else
- builder.appendLiteral("false");
+ builder.append("false");
}
} // namespace
@@ -128,12 +128,12 @@ const String WebMediaConstraintsPrivate::toString() const
builder.append(basic().toString());
if (!advanced().isEmpty()) {
if (builder.length() > 1)
- builder.appendLiteral(", ");
- builder.appendLiteral("advanced: [");
+ builder.append(", ");
+ builder.append("advanced: [");
bool first = true;
for (const auto& constraintSet : advanced()) {
if (!first)
- builder.appendLiteral(", ");
+ builder.append(", ");
builder.append('{');
builder.append(constraintSet.toString());
builder.append('}');
@@ -302,11 +302,11 @@ WebString StringConstraint::toString() const
StringBuilder builder;
builder.append('{');
if (!m_ideal.isEmpty()) {
- builder.appendLiteral("ideal: [");
+ builder.append("ideal: [");
bool first = true;
for (const auto& iter : m_ideal) {
if (!first)
- builder.appendLiteral(", ");
+ builder.append(", ");
builder.append('"');
builder.append(iter);
builder.append('"');
@@ -316,12 +316,12 @@ WebString StringConstraint::toString() const
}
if (!m_exact.isEmpty()) {
if (builder.length() > 1)
- builder.appendLiteral(", ");
- builder.appendLiteral("exact: [");
+ builder.append(", ");
+ builder.append("exact: [");
bool first = true;
for (const auto& iter : m_exact) {
if (!first)
- builder.appendLiteral(", ");
+ builder.append(", ");
builder.append('"');
builder.append(iter);
builder.append('"');
@@ -488,9 +488,9 @@ WebString WebMediaTrackConstraintSet::toString() const
for (const auto& constraint : allConstraints()) {
if (!constraint->isEmpty()) {
if (!first)
- builder.appendLiteral(", ");
+ builder.append(", ");
builder.append(constraint->name());
- builder.appendLiteral(": ");
+ builder.append(": ");
builder.append(constraint->toString());
first = false;
}
« no previous file with comments | « third_party/WebKit/Source/platform/PODInterval.h ('k') | third_party/WebKit/Source/platform/graphics/Color.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698