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

Unified Diff: Source/modules/websockets/WebSocketExtensionDispatcher.cpp

Issue 482753002: Use StringBuilder::appendLiteral() / StringBuilder::append(char) when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | « Source/modules/websockets/DOMWebSocket.cpp ('k') | Source/modules/websockets/WebSocketHandshake.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/websockets/WebSocketExtensionDispatcher.cpp
diff --git a/Source/modules/websockets/WebSocketExtensionDispatcher.cpp b/Source/modules/websockets/WebSocketExtensionDispatcher.cpp
index 397bae1bb61d168207b9243bb3e690751390982b..36ff82fb9bc3b15fb494bc437d4990745c3c850c 100644
--- a/Source/modules/websockets/WebSocketExtensionDispatcher.cpp
+++ b/Source/modules/websockets/WebSocketExtensionDispatcher.cpp
@@ -67,7 +67,7 @@ const String WebSocketExtensionDispatcher::createHeaderValue() const
StringBuilder builder;
builder.append(m_processors[0]->handshakeString());
for (size_t i = 1; i < numProcessors; ++i) {
- builder.append(", ");
+ builder.appendLiteral(", ");
builder.append(m_processors[i]->handshakeString());
}
return builder.toString();
@@ -76,14 +76,14 @@ const String WebSocketExtensionDispatcher::createHeaderValue() const
void WebSocketExtensionDispatcher::appendAcceptedExtension(const String& extensionToken, HashMap<String, String>& extensionParameters)
{
if (!m_acceptedExtensionsBuilder.isEmpty())
- m_acceptedExtensionsBuilder.append(", ");
+ m_acceptedExtensionsBuilder.appendLiteral(", ");
m_acceptedExtensionsBuilder.append(extensionToken);
// FIXME: Should use ListHashSet to keep the order of the parameters.
for (HashMap<String, String>::const_iterator iterator = extensionParameters.begin(); iterator != extensionParameters.end(); ++iterator) {
- m_acceptedExtensionsBuilder.append("; ");
+ m_acceptedExtensionsBuilder.appendLiteral("; ");
m_acceptedExtensionsBuilder.append(iterator->key);
if (!iterator->value.isNull()) {
- m_acceptedExtensionsBuilder.append("=");
+ m_acceptedExtensionsBuilder.append('=');
m_acceptedExtensionsBuilder.append(iterator->value);
}
}
« no previous file with comments | « Source/modules/websockets/DOMWebSocket.cpp ('k') | Source/modules/websockets/WebSocketHandshake.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698