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

Unified Diff: Source/core/html/parser/XSSAuditorDelegate.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/core/html/forms/ImageInputType.cpp ('k') | Source/core/html/track/vtt/VTTParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/XSSAuditorDelegate.cpp
diff --git a/Source/core/html/parser/XSSAuditorDelegate.cpp b/Source/core/html/parser/XSSAuditorDelegate.cpp
index 6f18f20cb83ee17844210f6cb0d5e2deb545c01e..51f0825f52b89b57da5d37814a62de594734fcb5 100644
--- a/Source/core/html/parser/XSSAuditorDelegate.cpp
+++ b/Source/core/html/parser/XSSAuditorDelegate.cpp
@@ -43,20 +43,20 @@ namespace blink {
String XSSInfo::buildConsoleError() const
{
StringBuilder message;
- message.append("The XSS Auditor ");
+ message.appendLiteral("The XSS Auditor ");
message.append(m_didBlockEntirePage ? "blocked access to" : "refused to execute a script in");
- message.append(" '");
+ message.appendLiteral(" '");
message.append(m_originalURL);
- message.append("' because ");
+ message.appendLiteral("' because ");
message.append(m_didBlockEntirePage ? "the source code of a script" : "its source code");
- message.append(" was found within the request.");
+ message.appendLiteral(" was found within the request.");
if (m_didSendCSPHeader)
- message.append(" The server sent a 'Content-Security-Policy' header requesting this behavior.");
+ message.appendLiteral(" The server sent a 'Content-Security-Policy' header requesting this behavior.");
else if (m_didSendXSSProtectionHeader)
- message.append(" The server sent an 'X-XSS-Protection' header requesting this behavior.");
+ message.appendLiteral(" The server sent an 'X-XSS-Protection' header requesting this behavior.");
else
- message.append(" The auditor was enabled as the server sent neither an 'X-XSS-Protection' nor 'Content-Security-Policy' header.");
+ message.appendLiteral(" The auditor was enabled as the server sent neither an 'X-XSS-Protection' nor 'Content-Security-Policy' header.");
return message.toString();
}
« no previous file with comments | « Source/core/html/forms/ImageInputType.cpp ('k') | Source/core/html/track/vtt/VTTParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698