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

Unified Diff: third_party/WebKit/Source/core/fileapi/Blob.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/core/fileapi/Blob.cpp
diff --git a/third_party/WebKit/Source/core/fileapi/Blob.cpp b/third_party/WebKit/Source/core/fileapi/Blob.cpp
index ad3473192a4529138064ce37fd54f79172e23fbb..7e3ed709a077f5135ab9435e151b138416de9d9f 100644
--- a/third_party/WebKit/Source/core/fileapi/Blob.cpp
+++ b/third_party/WebKit/Source/core/fileapi/Blob.cpp
@@ -98,15 +98,10 @@ Blob* Blob::create(
return nullptr;
}
- ASSERT(options.hasEndings());
- bool normalizeLineEndingsToNative = options.endings() == "native";
- if (normalizeLineEndingsToNative)
- UseCounter::count(context, UseCounter::FileAPINativeLineEndings);
-
std::unique_ptr<BlobData> blobData = BlobData::create();
blobData->setContentType(options.type().lower());
- populateBlobData(blobData.get(), blobParts, normalizeLineEndingsToNative);
+ populateBlobData(blobData.get(), blobParts);
long long blobSize = blobData->length();
return new Blob(BlobDataHandle::create(std::move(blobData), blobSize));
@@ -128,8 +123,7 @@ Blob* Blob::create(const unsigned char* data,
// static
void Blob::populateBlobData(
BlobData* blobData,
- const HeapVector<ArrayBufferOrArrayBufferViewOrBlobOrUSVString>& parts,
- bool normalizeLineEndingsToNative) {
+ const HeapVector<ArrayBufferOrArrayBufferViewOrBlobOrUSVString>& parts) {
for (const auto& item : parts) {
if (item.isArrayBuffer()) {
DOMArrayBuffer* arrayBuffer = item.getAsArrayBuffer();
@@ -141,7 +135,7 @@ void Blob::populateBlobData(
} else if (item.isBlob()) {
item.getAsBlob()->appendTo(*blobData);
} else if (item.isUSVString()) {
- blobData->appendText(item.getAsUSVString(), normalizeLineEndingsToNative);
+ blobData->appendText(item.getAsUSVString());
} else {
NOTREACHED();
}
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/Blob.h ('k') | third_party/WebKit/Source/core/fileapi/BlobPropertyBag.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698