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

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

Issue 2017303002: Revert of Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2ef844e0002bb8293133364d89bd6f71d51cc582..cd180cd5fcdda495b2c701decdb7f2a324e6c69d 100644
--- a/third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp
@@ -46,9 +46,9 @@
if (!emit)
return;
if (builder.length() > 1)
- builder.append(", ");
+ builder.appendLiteral(", ");
builder.append(name);
- builder.append(": ");
+ builder.appendLiteral(": ");
builder.appendNumber(value);
}
@@ -57,13 +57,13 @@
if (!emit)
return;
if (builder.length() > 1)
- builder.append(", ");
+ builder.appendLiteral(", ");
builder.append(name);
- builder.append(": ");
+ builder.appendLiteral(": ");
if (value)
- builder.append("true");
+ builder.appendLiteral("true");
else
- builder.append("false");
+ builder.appendLiteral("false");
}
} // namespace
@@ -128,12 +128,12 @@
builder.append(basic().toString());
if (!advanced().isEmpty()) {
if (builder.length() > 1)
- builder.append(", ");
- builder.append("advanced: [");
+ builder.appendLiteral(", ");
+ builder.appendLiteral("advanced: [");
bool first = true;
for (const auto& constraintSet : advanced()) {
if (!first)
- builder.append(", ");
+ builder.appendLiteral(", ");
builder.append('{');
builder.append(constraintSet.toString());
builder.append('}');
@@ -302,11 +302,11 @@
StringBuilder builder;
builder.append('{');
if (!m_ideal.isEmpty()) {
- builder.append("ideal: [");
+ builder.appendLiteral("ideal: [");
bool first = true;
for (const auto& iter : m_ideal) {
if (!first)
- builder.append(", ");
+ builder.appendLiteral(", ");
builder.append('"');
builder.append(iter);
builder.append('"');
@@ -316,12 +316,12 @@
}
if (!m_exact.isEmpty()) {
if (builder.length() > 1)
- builder.append(", ");
- builder.append("exact: [");
+ builder.appendLiteral(", ");
+ builder.appendLiteral("exact: [");
bool first = true;
for (const auto& iter : m_exact) {
if (!first)
- builder.append(", ");
+ builder.appendLiteral(", ");
builder.append('"');
builder.append(iter);
builder.append('"');
@@ -488,9 +488,9 @@
for (const auto& constraint : allConstraints()) {
if (!constraint->isEmpty()) {
if (!first)
- builder.append(", ");
+ builder.appendLiteral(", ");
builder.append(constraint->name());
- builder.append(": ");
+ builder.appendLiteral(": ");
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