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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « Source/modules/websockets/WebSocketChannel.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 4 * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
5 * Copyright (C) 2009 Google Inc. All rights reserved. 5 * Copyright (C) 2009 Google Inc. All rights reserved.
6 * Copyright (C) 2011 Apple Inc. All Rights Reserved. 6 * Copyright (C) 2011 Apple Inc. All Rights Reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 || c == '/' || c == '[' || c == ']' || c == '?' || c == '=' 122 || c == '/' || c == '[' || c == ']' || c == '?' || c == '='
123 || c == '{' || c == '}') 123 || c == '{' || c == '}')
124 return false; 124 return false;
125 } 125 }
126 return true; 126 return true;
127 } 127 }
128 128
129 static const size_t maxInputSampleSize = 128; 129 static const size_t maxInputSampleSize = 128;
130 static String trimInputSample(const char* p, size_t length) 130 static String trimInputSample(const char* p, size_t length)
131 { 131 {
132 String s = String(p, std::min<size_t>(length, maxInputSampleSize));
133 if (length > maxInputSampleSize) 132 if (length > maxInputSampleSize)
134 s.append(horizontalEllipsis); 133 return String(p, maxInputSampleSize) + horizontalEllipsis;
135 return s; 134 return String(p, length);
136 } 135 }
137 136
138 ContentDispositionType contentDispositionType(const String& contentDisposition) 137 ContentDispositionType contentDispositionType(const String& contentDisposition)
139 { 138 {
140 if (contentDisposition.isEmpty()) 139 if (contentDisposition.isEmpty())
141 return ContentDispositionNone; 140 return ContentDispositionNone;
142 141
143 Vector<String> parameters; 142 Vector<String> parameters;
144 contentDisposition.split(';', parameters); 143 contentDisposition.split(';', parameters);
145 144
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 678
680 size_t parseHTTPRequestBody(const char* data, size_t length, Vector<unsigned cha r>& body) 679 size_t parseHTTPRequestBody(const char* data, size_t length, Vector<unsigned cha r>& body)
681 { 680 {
682 body.clear(); 681 body.clear();
683 body.append(data, length); 682 body.append(data, length);
684 683
685 return length; 684 return length;
686 } 685 }
687 686
688 } 687 }
OLDNEW
« 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