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

Unified Diff: Source/core/loader/FormSubmission.cpp

Issue 134873010: Removed 'String::append' from some of the blink source. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Incorporated Review Comments 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
Index: Source/core/loader/FormSubmission.cpp
diff --git a/Source/core/loader/FormSubmission.cpp b/Source/core/loader/FormSubmission.cpp
index 178a996bc763acb3abfd5f022db45241dbde6af4..c75e21efba80ed66cc3cff393875a2d9468534a3 100644
--- a/Source/core/loader/FormSubmission.cpp
+++ b/Source/core/loader/FormSubmission.cpp
@@ -45,6 +45,7 @@
#include "platform/network/FormData.h"
#include "platform/network/FormDataBuilder.h"
#include "wtf/CurrentTime.h"
+#include "wtf/text/StringBuilder.h"
#include "wtf/text/TextEncoding.h"
namespace WebCore {
@@ -73,11 +74,12 @@ static void appendMailtoPostFormDataToURL(KURL& url, const FormData& data, const
FormDataBuilder::encodeStringAsFormData(bodyData, body.utf8());
body = String(bodyData.data(), bodyData.size()).replaceWithLiteral('+', "%20");
- String query = url.query();
+ StringBuilder query;
+ query.append(url.query());
if (!query.isEmpty())
query.append('&');
query.append(body);
- url.setQuery(query);
+ url.setQuery(query.toString());
}
void FormSubmission::Attributes::parseAction(const String& action)
« no previous file with comments | « Source/core/inspector/InspectorFileSystemAgent.cpp ('k') | Source/modules/websockets/WebSocketHandshake.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698