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

Unified Diff: Source/platform/network/ProxyServer.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/platform/mhtml/MHTMLArchive.cpp ('k') | Source/platform/text/DateTimeFormat.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/network/ProxyServer.cpp
diff --git a/Source/platform/network/ProxyServer.cpp b/Source/platform/network/ProxyServer.cpp
index 5b80e510e911b479271e80c5a5da29111dc1053b..4b208a3a68aeb321ced65fd8aa0579216215805b 100644
--- a/Source/platform/network/ProxyServer.cpp
+++ b/Source/platform/network/ProxyServer.cpp
@@ -34,14 +34,14 @@ static void appendProxyServerString(StringBuilder& builder, const ProxyServer& p
{
switch (proxyServer.type()) {
case ProxyServer::Direct:
- builder.append("DIRECT");
+ builder.appendLiteral("DIRECT");
return;
case ProxyServer::HTTP:
case ProxyServer::HTTPS:
- builder.append("PROXY");
+ builder.appendLiteral("PROXY");
break;
case ProxyServer::SOCKS:
- builder.append("SOCKS");
+ builder.appendLiteral("SOCKS");
break;
}
@@ -63,7 +63,7 @@ String toString(const Vector<ProxyServer>& proxyServers)
StringBuilder stringBuilder;
for (size_t i = 0; i < proxyServers.size(); ++i) {
if (i)
- stringBuilder.append("; ");
+ stringBuilder.appendLiteral("; ");
appendProxyServerString(stringBuilder, proxyServers[i]);
}
« no previous file with comments | « Source/platform/mhtml/MHTMLArchive.cpp ('k') | Source/platform/text/DateTimeFormat.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698