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

Unified Diff: third_party/WebKit/Source/platform/blob/BlobData.cpp

Issue 2147633002: Remove nonstandard 'endings' option for Blob/File constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 3 years, 12 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/blob/BlobData.cpp
diff --git a/third_party/WebKit/Source/platform/blob/BlobData.cpp b/third_party/WebKit/Source/platform/blob/BlobData.cpp
index c0c7199c6e2bfce24dfb039663abea02bc6c4359..caba73c3eb42151ca11c260dbb80e99a1b6db97b 100644
--- a/third_party/WebKit/Source/platform/blob/BlobData.cpp
+++ b/third_party/WebKit/Source/platform/blob/BlobData.cpp
@@ -133,8 +133,7 @@ void BlobData::appendFileSystemURL(const KURL& url,
m_items.append(BlobDataItem(url, offset, length, expectedModificationTime));
}
-void BlobData::appendText(const String& text,
- bool doNormalizeLineEndingsToNative) {
+void BlobData::appendText(const String& text) {
CHECK_EQ(m_fileComposition, FileCompositionStatus::NO_UNKNOWN_SIZE_FILES)
<< "Blobs with a unknown-size file cannot have other items.";
CString utf8Text = UTF8Encoding().encode(text, WTF::EntitiesForUnencodables);
@@ -147,11 +146,7 @@ void BlobData::appendText(const String& text,
buffer = data->mutableData();
}
- if (doNormalizeLineEndingsToNative) {
- normalizeLineEndingsToNative(utf8Text, *buffer);
- } else {
- buffer->append(utf8Text.data(), utf8Text.length());
- }
+ buffer->append(utf8Text.data(), utf8Text.length());
if (data)
m_items.append(BlobDataItem(data.release()));
« no previous file with comments | « third_party/WebKit/Source/platform/blob/BlobData.h ('k') | third_party/WebKit/Source/platform/blob/BlobDataTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698