New issue
Advanced search Search tips

Issue 872460 link

Starred by 5 users

Issue metadata

Status: Started
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocked on:
issue 872462

Blocking:
issue 853326



Sign in to add a comment

Implement more modern FileWriter API

Project Member Reported by mek@chromium.org, Aug 8

Issue description

As explained in https://github.com/WICG/writable-files/blob/master/EXPLAINER.md, FileWriter based on promises.
 
Blockedon: 872462
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 15

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/16af198606d27fe1a78208d0e30762884e7dc2a0

commit 16af198606d27fe1a78208d0e30762884e7dc2a0
Author: Marijn Kruisselbrink <mek@chromium.org>
Date: Wed Aug 15 21:22:35 2018

[FileSystem] Add initial bits of new FileWriter implementation.

This adds a WritableFiles RuntimeEnabledFeature, as well as a new
FileSystemWriter interface (exact name TBD) and a mojo interface the
implementation uses.

Bug: 872460
Change-Id: I830a44d5df75fbfb5fbb1c97048a589a4facedc5
Reviewed-on: https://chromium-review.googlesource.com/1169773
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583400}
[modify] https://crrev.com/16af198606d27fe1a78208d0e30762884e7dc2a0/third_party/blink/public/blink_typemaps.gni
[modify] https://crrev.com/16af198606d27fe1a78208d0e30762884e7dc2a0/third_party/blink/public/mojom/BUILD.gn
[add] https://crrev.com/16af198606d27fe1a78208d0e30762884e7dc2a0/third_party/blink/public/mojom/filesystem/file_writer.mojom
[modify] https://crrev.com/16af198606d27fe1a78208d0e30762884e7dc2a0/third_party/blink/renderer/modules/filesystem/BUILD.gn
[add] https://crrev.com/16af198606d27fe1a78208d0e30762884e7dc2a0/third_party/blink/renderer/modules/filesystem/file_system_writer.cc
[add] https://crrev.com/16af198606d27fe1a78208d0e30762884e7dc2a0/third_party/blink/renderer/modules/filesystem/file_system_writer.h
[add] https://crrev.com/16af198606d27fe1a78208d0e30762884e7dc2a0/third_party/blink/renderer/modules/filesystem/file_system_writer.idl
[modify] https://crrev.com/16af198606d27fe1a78208d0e30762884e7dc2a0/third_party/blink/renderer/modules/modules_idl_files.gni
[modify] https://crrev.com/16af198606d27fe1a78208d0e30762884e7dc2a0/third_party/blink/renderer/platform/runtime_enabled_features.json5
[modify] https://crrev.com/16af198606d27fe1a78208d0e30762884e7dc2a0/third_party/blink/tools/audit_non_blink_usage.py

Project Member

Comment 4 by bugdroid1@chromium.org, Aug 23

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9a6a0cab0631500581bab3d33a69746212fb1301

commit 9a6a0cab0631500581bab3d33a69746212fb1301
Author: Marijn Kruisselbrink <mek@chromium.org>
Date: Thu Aug 23 02:06:39 2018

[FileSystem] Use more descriptive error messages/codes in new APIs.

This adds a method to blink::FileError that more or less does the same
as blink::FileError::CreateDOMException(content::FileErrorToWebFileError(code)),
just without the extra conversion through WebFileError and
blink::FileError::ErrorCode in between.

Bug: 872460, 872465
Change-Id: I6b7f94d9a3da2fa730cf78f5a74d5315d34c95c0
Reviewed-on: https://chromium-review.googlesource.com/1185791
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585367}
[modify] https://crrev.com/9a6a0cab0631500581bab3d33a69746212fb1301/third_party/blink/renderer/core/DEPS
[modify] https://crrev.com/9a6a0cab0631500581bab3d33a69746212fb1301/third_party/blink/renderer/core/fileapi/file_error.cc
[modify] https://crrev.com/9a6a0cab0631500581bab3d33a69746212fb1301/third_party/blink/renderer/core/fileapi/file_error.h
[modify] https://crrev.com/9a6a0cab0631500581bab3d33a69746212fb1301/third_party/blink/renderer/modules/filesystem/file_system_writer.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c9230c467a4af8f66c0c04b7b1b6179c6a661a15

commit c9230c467a4af8f66c0c04b7b1b6179c6a661a15
Author: Marijn Kruisselbrink <mek@chromium.org>
Date: Mon Aug 27 18:42:15 2018

[FileSystem] Hook up new FileWriter API to backend.

Implements method to create a FileWriter for a FileSystemFileHandle, as
well as fixes a bug in the FileSystemWriter implementation.

Bug: 872460, 872465
Change-Id: Idfd7d2b486a7f2e1b0ec3f996ba940e10236b764
Reviewed-on: https://chromium-review.googlesource.com/1185624
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586335}
[modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/content/browser/fileapi/file_system_manager_impl.cc
[modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/content/browser/fileapi/file_system_manager_impl.h
[modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/content/renderer/fileapi/file_system_dispatcher.cc
[modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/content/renderer/fileapi/file_system_dispatcher.h
[modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/content/renderer/fileapi/webfilesystem_impl.cc
[modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/content/renderer/fileapi/webfilesystem_impl.h
[modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/third_party/blink/public/mojom/filesystem/file_system.mojom
[modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/third_party/blink/public/platform/DEPS
[modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/third_party/blink/public/platform/web_file_system.h
[modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/third_party/blink/renderer/modules/filesystem/file_system_file_handle.cc
[modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/third_party/blink/renderer/modules/filesystem/file_system_writer.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Sep 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ee3b792f0f5dfde6510fd601740d4bb252f0eb3a

commit ee3b792f0f5dfde6510fd601740d4bb252f0eb3a
Author: Marijn Kruisselbrink <mek@chromium.org>
Date: Wed Sep 12 22:01:13 2018

[FileSystem] Start adding layout tests for new writer API.

Also some changes to the way the feature is enabled:

1. Change the RuntimeEnabledFeature to status=experimental, to make it
actually be enabled by default in layout tests.

2. Change the code in runtime_features.cc to not switch off the runtime
feature, but merely use the base::Feature as an aditional way to turn on
the runtime feature.

3. Move the code in runtime_features.cc to be above the "do not add
individual features below this line" line.

Enabling only the runtime features does mean that new functionality isn't
available yet (i.e. the choose entry style API), but I think that is the
desired behavior anyway, and most layout tests at least for now won't need
any of that.

Bug: 872460
Change-Id: Ic16cd9d3d23fe704ee6a6581a96c33406cb47b08
Reviewed-on: https://chromium-review.googlesource.com/1199819
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590833}
[modify] https://crrev.com/ee3b792f0f5dfde6510fd601740d4bb252f0eb3a/content/child/runtime_features.cc
[add] https://crrev.com/ee3b792f0f5dfde6510fd601740d4bb252f0eb3a/third_party/WebKit/LayoutTests/fast/filesystem/writable-files/file-writer.html
[modify] https://crrev.com/ee3b792f0f5dfde6510fd601740d4bb252f0eb3a/third_party/blink/renderer/platform/runtime_enabled_features.json5

Sign in to add a comment