chore: bump chromium to bf3f97675b5d9eade34526ebf730c (master) (#27305)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
1023988ea8
commit
ed126eced4
55 changed files with 245 additions and 230 deletions
|
@ -255,22 +255,28 @@ v8::Local<v8::Value> Converter<network::ResourceRequestBody>::ToV8(
|
|||
const auto& element = elements[i];
|
||||
gin::Dictionary upload_data(isolate, v8::Object::New(isolate));
|
||||
switch (element.type()) {
|
||||
case network::mojom::DataElementType::kFile:
|
||||
case network::mojom::DataElement::Tag::kFile: {
|
||||
const auto& element_file = element.As<network::DataElementFile>();
|
||||
upload_data.Set("type", "file");
|
||||
upload_data.Set("file", element.path().value());
|
||||
upload_data.Set("filePath", base::Value(element.path().AsUTF8Unsafe()));
|
||||
upload_data.Set("offset", static_cast<int>(element.offset()));
|
||||
upload_data.Set("length", static_cast<int>(element.length()));
|
||||
upload_data.Set("file", element_file.path().value());
|
||||
upload_data.Set("filePath",
|
||||
base::Value(element_file.path().AsUTF8Unsafe()));
|
||||
upload_data.Set("offset", static_cast<int>(element_file.offset()));
|
||||
upload_data.Set("length", static_cast<int>(element_file.length()));
|
||||
upload_data.Set("modificationTime",
|
||||
element.expected_modification_time().ToDoubleT());
|
||||
element_file.expected_modification_time().ToDoubleT());
|
||||
break;
|
||||
case network::mojom::DataElementType::kBytes:
|
||||
}
|
||||
case network::mojom::DataElement::Tag::kBytes: {
|
||||
upload_data.Set("type", "rawData");
|
||||
upload_data.Set("bytes", node::Buffer::Copy(isolate, element.bytes(),
|
||||
element.length())
|
||||
.ToLocalChecked());
|
||||
const auto& bytes = element.As<network::DataElementBytes>().bytes();
|
||||
const char* data = reinterpret_cast<const char*>(bytes.data());
|
||||
upload_data.Set(
|
||||
"bytes",
|
||||
node::Buffer::Copy(isolate, data, bytes.size()).ToLocalChecked());
|
||||
break;
|
||||
case network::mojom::DataElementType::kDataPipe: {
|
||||
}
|
||||
case network::mojom::DataElement::Tag::kDataPipe: {
|
||||
upload_data.Set("type", "blob");
|
||||
// TODO(zcbenz): After the NetworkService refactor, the old blobUUID API
|
||||
// becomes unnecessarily complex, we should deprecate the getBlobData
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue