Commit 4eaf36d3 authored by Austin Sullivan's avatar Austin Sullivan Committed by Chromium LUCI CQ

[FSA] Refactor CreateWriterOptions -> CreateWritableOptions

This change was originally proposed in this refactor [1], but has been
split into another CL.

[1] https://crrev.com/c/2601576

Bug: 1110509
Change-Id: Ifd92321c5136ac3b29a714f24ad39674c866c9f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2604975
Commit-Queue: Austin Sullivan <asully@chromium.org>
Reviewed-by: default avatarMarijn Kruisselbrink <mek@chromium.org>
Reviewed-by: default avatarDaniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841539}
parent 04f3f163
......@@ -98,12 +98,12 @@ class FileSystemHandle {
}
/** @typedef {{keepExistingData: boolean}} */
let FileSystemCreateWriterOptions;
let FileSystemCreateWritableOptions;
/** @interface */
class FileSystemFileHandle extends FileSystemHandle {
/**
* @param {FileSystemCreateWriterOptions=} options
* @param {FileSystemCreateWritableOptions=} options
* @return {!Promise<!FileSystemWritableFileStream>}
*/
createWritable(options) {}
......
......@@ -283,8 +283,8 @@ generated_dictionary_sources_in_modules = [
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_file_picker_accept_type.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_file_picker_options.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_file_picker_options.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_file_system_create_writer_options.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_file_system_create_writer_options.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_file_system_create_writable_options.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_file_system_create_writable_options.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_file_system_flags.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_file_system_flags.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_file_system_get_directory_options.cc",
......
......@@ -210,7 +210,7 @@ static_idl_files_in_modules = get_path_info(
"//third_party/blink/renderer/modules/file_system_access/directory_picker_options.idl",
"//third_party/blink/renderer/modules/file_system_access/file_picker_accept_type.idl",
"//third_party/blink/renderer/modules/file_system_access/file_picker_options.idl",
"//third_party/blink/renderer/modules/file_system_access/file_system_create_writer_options.idl",
"//third_party/blink/renderer/modules/file_system_access/file_system_create_writable_options.idl",
"//third_party/blink/renderer/modules/file_system_access/file_system_directory_handle.idl",
"//third_party/blink/renderer/modules/file_system_access/file_system_file_handle.idl",
"//third_party/blink/renderer/modules/file_system_access/file_system_get_directory_options.idl",
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://wicg.github.io/file-system-access/#dictdef-filesystemcreatewriteroptions
dictionary FileSystemCreateWriterOptions {
// https://wicg.github.io/file-system-access/#dictdef-filesystemcreatewritableoptions
dictionary FileSystemCreateWritableOptions {
boolean keepExistingData = false;
[RuntimeEnabled=FileSystemAccessAPIExperimental] boolean autoClose = false;
};
......@@ -8,7 +8,7 @@
#include "third_party/blink/public/mojom/file_system_access/file_system_access_file_writer.mojom-blink.h"
#include "third_party/blink/public/mojom/file_system_access/file_system_access_transfer_token.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_file_system_create_writer_options.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_file_system_create_writable_options.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/fileapi/file.h"
#include "third_party/blink/renderer/core/fileapi/file_error.h"
......@@ -34,7 +34,7 @@ FileSystemFileHandle::FileSystemFileHandle(
ScriptPromise FileSystemFileHandle::createWritable(
ScriptState* script_state,
const FileSystemCreateWriterOptions* options,
const FileSystemCreateWritableOptions* options,
ExceptionState& exception_state) {
if (!mojo_ptr_.is_bound()) {
exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError, "");
......
......@@ -11,7 +11,7 @@
#include "third_party/blink/renderer/platform/mojo/heap_mojo_remote.h"
namespace blink {
class FileSystemCreateWriterOptions;
class FileSystemCreateWritableOptions;
class FileSystemFileHandle final : public FileSystemHandle {
DEFINE_WRAPPERTYPEINFO();
......@@ -25,7 +25,7 @@ class FileSystemFileHandle final : public FileSystemHandle {
bool isFile() const override { return true; }
ScriptPromise createWritable(ScriptState*,
const FileSystemCreateWriterOptions* options,
const FileSystemCreateWritableOptions* options,
ExceptionState&);
ScriptPromise getFile(ScriptState*, ExceptionState&);
......
......@@ -9,7 +9,8 @@
Serializable,
RuntimeEnabled=FileSystemAccess
] interface FileSystemFileHandle : FileSystemHandle {
[CallWith=ScriptState, RaisesException] Promise<FileSystemWritableFileStream> createWritable(optional FileSystemCreateWriterOptions options = {});
[CallWith=ScriptState, RaisesException]
Promise<FileSystemWritableFileStream> createWritable(optional FileSystemCreateWritableOptions options = {});
[CallWith=ScriptState, RaisesException] Promise<File> getFile();
};
......@@ -14,7 +14,7 @@ modules_dictionary_idl_files = [
"directory_picker_options.idl",
"file_picker_accept_type.idl",
"file_picker_options.idl",
"file_system_create_writer_options.idl",
"file_system_create_writable_options.idl",
"file_system_get_directory_options.idl",
"file_system_get_file_options.idl",
"file_system_handle_permission_descriptor.idl",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment