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

Unified Diff: Source/platform/network/HTTPParsers.cpp

Issue 124943003: Remove 'String::append' from some of the blink source. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removing the CustomFilterValidatedProgram.cpp from the patch(File is deleted in r164847) Created 6 years, 11 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/WebSocketChannel.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/network/HTTPParsers.cpp
diff --git a/Source/platform/network/HTTPParsers.cpp b/Source/platform/network/HTTPParsers.cpp
old mode 100644
new mode 100755
index e557188493514fe12aec80518c21f6f428266bd0..d833fe14ed5b47ed7adf36d141551e9c46bfd2c4
--- a/Source/platform/network/HTTPParsers.cpp
+++ b/Source/platform/network/HTTPParsers.cpp
@@ -129,10 +129,9 @@ bool isValidHTTPToken(const String& characters)
static const size_t maxInputSampleSize = 128;
static String trimInputSample(const char* p, size_t length)
{
- String s = String(p, std::min<size_t>(length, maxInputSampleSize));
if (length > maxInputSampleSize)
- s.append(horizontalEllipsis);
- return s;
+ return String(p, maxInputSampleSize) + horizontalEllipsis;
+ return String(p, length);
}
ContentDispositionType contentDispositionType(const String& contentDisposition)
« no previous file with comments | « Source/modules/websockets/WebSocketChannel.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698