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

Unified Diff: third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp

Issue 2017053003: Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. Created 4 years, 7 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: third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp
diff --git a/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp b/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp
index a4f4b997fd5e27be932abc49ec012d045112143f..8f6f23fb22dae8f515f4fe91efbfadb0d66257d2 100644
--- a/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp
+++ b/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp
@@ -105,20 +105,20 @@ void MHTMLArchive::generateMHTMLHeader(
now.hour(), now.minute(), now.second(), 0);
StringBuilder stringBuilder;
- stringBuilder.appendLiteral("From: <Saved by Blink>\r\n");
- stringBuilder.appendLiteral("Subject: ");
+ stringBuilder.append("From: <Saved by Blink>\r\n");
+ stringBuilder.append("Subject: ");
// We replace non ASCII characters with '?' characters to match IE's behavior.
stringBuilder.append(replaceNonPrintableCharacters(title));
- stringBuilder.appendLiteral("\r\nDate: ");
+ stringBuilder.append("\r\nDate: ");
stringBuilder.append(dateString);
- stringBuilder.appendLiteral("\r\nMIME-Version: 1.0\r\n");
- stringBuilder.appendLiteral("Content-Type: multipart/related;\r\n");
- stringBuilder.appendLiteral("\ttype=\"");
+ stringBuilder.append("\r\nMIME-Version: 1.0\r\n");
+ stringBuilder.append("Content-Type: multipart/related;\r\n");
+ stringBuilder.append("\ttype=\"");
stringBuilder.append(mimeType);
- stringBuilder.appendLiteral("\";\r\n");
- stringBuilder.appendLiteral("\tboundary=\"");
+ stringBuilder.append("\";\r\n");
+ stringBuilder.append("\tboundary=\"");
stringBuilder.append(boundary);
- stringBuilder.appendLiteral("\"\r\n\r\n");
+ stringBuilder.append("\"\r\n\r\n");
// We use utf8() below instead of ascii() as ascii() replaces CRLFs with ??
// (we still only have put ASCII characters in it).
@@ -143,14 +143,14 @@ void MHTMLArchive::generateMHTMLPart(
stringBuilder.append(boundary);
stringBuilder.append("\r\n");
- stringBuilder.appendLiteral("Content-Type: ");
+ stringBuilder.append("Content-Type: ");
stringBuilder.append(resource.mimeType);
- stringBuilder.appendLiteral("\r\n");
+ stringBuilder.append("\r\n");
if (!contentID.isEmpty()) {
- stringBuilder.appendLiteral("Content-ID: ");
+ stringBuilder.append("Content-ID: ");
stringBuilder.append(contentID);
- stringBuilder.appendLiteral("\r\n");
+ stringBuilder.append("\r\n");
}
const char* contentEncoding = 0;
@@ -161,17 +161,17 @@ void MHTMLArchive::generateMHTMLPart(
else
contentEncoding = base64;
- stringBuilder.appendLiteral("Content-Transfer-Encoding: ");
+ stringBuilder.append("Content-Transfer-Encoding: ");
stringBuilder.append(contentEncoding);
- stringBuilder.appendLiteral("\r\n");
+ stringBuilder.append("\r\n");
if (!resource.url.protocolIsAbout()) {
- stringBuilder.appendLiteral("Content-Location: ");
+ stringBuilder.append("Content-Location: ");
stringBuilder.append(resource.url.getString());
- stringBuilder.appendLiteral("\r\n");
+ stringBuilder.append("\r\n");
}
- stringBuilder.appendLiteral("\r\n");
+ stringBuilder.append("\r\n");
CString asciiString = stringBuilder.toString().utf8();
outputBuffer.append(asciiString.data(), asciiString.length());
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Color.cpp ('k') | third_party/WebKit/Source/platform/text/DateTimeFormat.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698