Title: [212327] trunk/Source/WebCore
Revision
212327
Author
[email protected]
Date
2017-02-14 15:16:00 -0800 (Tue, 14 Feb 2017)

Log Message

Removed unused methods of WebCore::FileStream
https://bugs.webkit.org/show_bug.cgi?id=168025

Patch by Karim H <[email protected]> on 2017-02-14
Reviewed by Michael Catanzaro.

* fileapi/AsyncFileStream.cpp:
(WebCore::AsyncFileStream::openForWrite): Deleted.
(WebCore::AsyncFileStream::write): Deleted.
(WebCore::AsyncFileStream::truncate): Deleted.
* fileapi/AsyncFileStream.h:
* platform/FileStream.cpp:
(WebCore::FileStream::openForWrite): Deleted.
(WebCore::FileStream::write): Deleted.
(WebCore::FileStream::truncate): Deleted.
* platform/FileStream.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (212326 => 212327)


--- trunk/Source/WebCore/ChangeLog	2017-02-14 23:11:34 UTC (rev 212326)
+++ trunk/Source/WebCore/ChangeLog	2017-02-14 23:16:00 UTC (rev 212327)
@@ -1,3 +1,21 @@
+2017-02-14  Karim H  <[email protected]>
+
+        Removed unused methods of WebCore::FileStream
+        https://bugs.webkit.org/show_bug.cgi?id=168025
+
+        Reviewed by Michael Catanzaro.
+
+        * fileapi/AsyncFileStream.cpp:
+        (WebCore::AsyncFileStream::openForWrite): Deleted.
+        (WebCore::AsyncFileStream::write): Deleted.
+        (WebCore::AsyncFileStream::truncate): Deleted.
+        * fileapi/AsyncFileStream.h:
+        * platform/FileStream.cpp:
+        (WebCore::FileStream::openForWrite): Deleted.
+        (WebCore::FileStream::write): Deleted.
+        (WebCore::FileStream::truncate): Deleted.
+        * platform/FileStream.h:
+
 2017-02-14  Chris Dumez  <[email protected]>
 
         HTML Form Validation bubble should take minimum font size setting into consideration

Modified: trunk/Source/WebCore/fileapi/AsyncFileStream.cpp (212326 => 212327)


--- trunk/Source/WebCore/fileapi/AsyncFileStream.cpp	2017-02-14 23:11:34 UTC (rev 212326)
+++ trunk/Source/WebCore/fileapi/AsyncFileStream.cpp	2017-02-14 23:16:00 UTC (rev 212327)
@@ -156,16 +156,6 @@
     });
 }
 
-void AsyncFileStream::openForWrite(const String& path)
-{
-    perform([path = path.isolatedCopy()](FileStream& stream) -> std::function<void(FileStreamClient&)> {
-        bool success = stream.openForWrite(path);
-        return [success](FileStreamClient& client) {
-            client.didOpen(success);
-        };
-    });
-}
-
 void AsyncFileStream::close()
 {
     auto& internals = *m_internals;
@@ -184,24 +174,4 @@
     });
 }
 
-void AsyncFileStream::write(const URL& blobURL, long long position, int length)
-{
-    perform([blobURL = blobURL.isolatedCopy(), position, length](FileStream& stream) -> std::function<void(FileStreamClient&)> {
-        int bytesWritten = stream.write(blobURL, position, length);
-        return [bytesWritten](FileStreamClient& client) {
-            client.didWrite(bytesWritten);
-        };
-    });
-}
-
-void AsyncFileStream::truncate(long long position)
-{
-    perform([position](FileStream& stream) -> std::function<void(FileStreamClient&)> {
-        bool success = stream.truncate(position);
-        return [success](FileStreamClient& client) {
-            client.didTruncate(success);
-        };
-    });
-}
-
 } // namespace WebCore

Modified: trunk/Source/WebCore/fileapi/AsyncFileStream.h (212326 => 212327)


--- trunk/Source/WebCore/fileapi/AsyncFileStream.h	2017-02-14 23:11:34 UTC (rev 212326)
+++ trunk/Source/WebCore/fileapi/AsyncFileStream.h	2017-02-14 23:16:00 UTC (rev 212327)
@@ -48,11 +48,8 @@
 
     void getSize(const String& path, double expectedModificationTime);
     void openForRead(const String& path, long long offset, long long length);
-    void openForWrite(const String& path);
     void close();
     void read(char* buffer, int length);
-    void write(const URL& blobURL, long long position, int length);
-    void truncate(long long position);
 
 private:
     void start();

Modified: trunk/Source/WebCore/platform/FileStream.cpp (212326 => 212327)


--- trunk/Source/WebCore/platform/FileStream.cpp	2017-02-14 23:11:34 UTC (rev 212326)
+++ trunk/Source/WebCore/platform/FileStream.cpp	2017-02-14 23:16:00 UTC (rev 212327)
@@ -90,12 +90,6 @@
     return true;
 }
 
-bool FileStream::openForWrite(const String&)
-{
-    // FIXME: to be implemented.
-    return false;
-}
-
 void FileStream::close()
 {
     if (isHandleValid(m_handle)) {
@@ -122,16 +116,4 @@
     return bytesRead;
 }
 
-int FileStream::write(const URL&, long long, int)
-{
-    // FIXME: to be implemented.
-    return -1;
-}
-
-bool FileStream::truncate(long long)
-{
-    // FIXME: to be implemented.
-    return false;
-}
-
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/FileStream.h (212326 => 212327)


--- trunk/Source/WebCore/platform/FileStream.h	2017-02-14 23:11:34 UTC (rev 212326)
+++ trunk/Source/WebCore/platform/FileStream.h	2017-02-14 23:16:00 UTC (rev 212327)
@@ -51,10 +51,6 @@
     // Returns true on success. False otherwise.
     bool openForRead(const String& path, long long offset, long long length);
 
-    // Opens a file for writing.
-    // Returns true on success. False otherwise.
-    bool openForWrite(const String& path);
-
     // Closes the file.
     void close();
 
@@ -63,14 +59,6 @@
     // If 0 is returned, it means that the reading is completed.
     int read(char* buffer, int length);
 
-    // Writes a blob to the file.
-    // Returns number of bytes being written on success. -1 otherwise.
-    int write(const URL& blobURL, long long position, int length);
-
-    // Truncates the file to the specified position.
-    // Returns true on success. False otherwise.
-    bool truncate(long long position);
-
 private:
     PlatformFileHandle m_handle;
     long long m_bytesProcessed;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to