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

Unified Diff: Source/core/fileapi/FileReaderLoader.cpp

Issue 6231550869897216: Remove dead code behind ENABLE(STREAM) guards (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | « Source/core/fileapi/FileReaderLoader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fileapi/FileReaderLoader.cpp
diff --git a/Source/core/fileapi/FileReaderLoader.cpp b/Source/core/fileapi/FileReaderLoader.cpp
index c6d340330c3ac48c5dd14152e37d2f54b3968995..e11b4e059b8c5ad9f0bc6efe7c25d752f25b4ec0 100644
--- a/Source/core/fileapi/FileReaderLoader.cpp
+++ b/Source/core/fileapi/FileReaderLoader.cpp
@@ -274,29 +274,6 @@ PassRefPtr<ArrayBuffer> FileReaderLoader::arrayBufferResult() const
return m_rawData->slice(0, m_bytesLoaded);
}
-#if ENABLE(STREAM)
-PassRefPtr<Blob> FileReaderLoader::blobResult()
-{
- ASSERT(m_readType == ReadAsBlob);
-
- // If the loading is not finished or an error occurs, return an empty result.
- if (!m_rawData || m_errorCode || !isCompleted())
- return 0;
-
- if (!m_blobResult) {
- OwnPtr<BlobData> blobData = BlobData::create();
- size_t size = 0;
- RefPtr<RawData> rawData = RawData::create();
- size = m_rawData->byteLength();
- rawData->mutableData()->append(static_cast<char*>(m_rawData->data()), size);
- blobData->appendData(rawData, 0, size);
- blobData->setContentType(m_dataType);
- m_blobResult = Blob::create(blobData.release(), size);
- }
- return m_blobResult;
-}
-#endif // ENABLE(STREAM)
-
String FileReaderLoader::stringResult()
{
ASSERT(m_readType != ReadAsArrayBuffer && m_readType != ReadAsBlob);
@@ -384,14 +361,4 @@ void FileReaderLoader::setEncoding(const String& encoding)
m_encoding = WTF::TextEncoding(encoding);
}
-#if ENABLE(STREAM)
-void FileReaderLoader::setRange(unsigned start, unsigned length)
-{
- ASSERT(length > 0);
- m_hasRange = true;
- m_rangeStart = start;
- m_rangeEnd = start + length - 1;
-}
-#endif // ENABLE(STREAM)
-
} // namespace WebCore
« no previous file with comments | « Source/core/fileapi/FileReaderLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698