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

Unified Diff: third_party/WebKit/Source/core/fileapi/Blob.cpp

Issue 1906153002: File API: Add a use counter for nonstandard 'endings' option (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/Blob.h ('k') | third_party/WebKit/Source/core/fileapi/Blob.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d744a0057c355bb3639b447990eb77283a54b299..957b793c58861da7faf0a5c3f88631254f86b651 100644
--- a/third_party/WebKit/Source/core/fileapi/Blob.cpp
+++ b/third_party/WebKit/Source/core/fileapi/Blob.cpp
@@ -35,6 +35,7 @@
#include "core/dom/ExceptionCode.h"
#include "core/dom/ExecutionContext.h"
#include "core/fileapi/BlobPropertyBag.h"
+#include "core/frame/UseCounter.h"
#include "platform/blob/BlobRegistry.h"
#include "platform/blob/BlobURL.h"
@@ -85,7 +86,7 @@ Blob::~Blob()
}
// static
-Blob* Blob::create(const HeapVector<ArrayBufferOrArrayBufferViewOrBlobOrString>& blobParts, const BlobPropertyBag& options, ExceptionState& exceptionState)
+Blob* Blob::create(ExecutionContext* context, const HeapVector<ArrayBufferOrArrayBufferViewOrBlobOrString>& blobParts, const BlobPropertyBag& options, ExceptionState& exceptionState)
{
ASSERT(options.hasType());
if (!options.type().containsOnlyASCII()) {
@@ -95,6 +96,8 @@ Blob* Blob::create(const HeapVector<ArrayBufferOrArrayBufferViewOrBlobOrString>&
ASSERT(options.hasEndings());
bool normalizeLineEndingsToNative = options.endings() == "native";
+ if (normalizeLineEndingsToNative)
+ UseCounter::count(context, UseCounter::FileAPINativeLineEndings);
OwnPtr<BlobData> blobData = BlobData::create();
blobData->setContentType(options.type().lower());
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/Blob.h ('k') | third_party/WebKit/Source/core/fileapi/Blob.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698