diff --git a/atom/common/native_mate_converters/content_converter.cc b/atom/common/native_mate_converters/content_converter.cc index c064df43b663..01682bb7706e 100644 --- a/atom/common/native_mate_converters/content_converter.cc +++ b/atom/common/native_mate_converters/content_converter.cc @@ -221,16 +221,16 @@ Converter>::ToV8( post_data_dict->Set("bytes", std::move(bytes)); } else if (type == ResourceRequestBody::Element::TYPE_FILE) { post_data_dict->SetString("type", "file"); - post_data_dict->SetStringWithoutPathExpansion( - "filePath", element.path().AsUTF8Unsafe()); + post_data_dict->SetKey("filePath", + base::Value(element.path().AsUTF8Unsafe())); post_data_dict->SetInteger("offset", static_cast(element.offset())); post_data_dict->SetInteger("length", static_cast(element.length())); post_data_dict->SetDouble( "modificationTime", element.expected_modification_time().ToDoubleT()); } else if (type == ResourceRequestBody::Element::TYPE_FILE_FILESYSTEM) { post_data_dict->SetString("type", "fileSystem"); - post_data_dict->SetStringWithoutPathExpansion( - "fileSystemURL", element.filesystem_url().spec()); + post_data_dict->SetKey("fileSystemURL", + base::Value(element.filesystem_url().spec())); post_data_dict->SetInteger("offset", static_cast(element.offset())); post_data_dict->SetInteger("length", static_cast(element.length())); post_data_dict->SetDouble( diff --git a/atom/common/native_mate_converters/net_converter.cc b/atom/common/native_mate_converters/net_converter.cc index 05c20ea6be28..618c089ae9ab 100644 --- a/atom/common/native_mate_converters/net_converter.cc +++ b/atom/common/native_mate_converters/net_converter.cc @@ -203,7 +203,7 @@ void FillRequestDetails(base::DictionaryValue* details, details->SetString("method", request->method()); std::string url; if (!request->url_chain().empty()) url = request->url().spec(); - details->SetStringWithoutPathExpansion("url", url); + details->SetKey("url", base::Value(url)); details->SetString("referrer", request->referrer()); std::unique_ptr list(new base::ListValue); GetUploadData(list.get(), request); @@ -239,7 +239,7 @@ void GetUploadData(base::ListValue* upload_data_list, const net::UploadFileElementReader* file_reader = reader->AsFileReader(); auto file_path = file_reader->path().AsUTF8Unsafe(); - upload_data_dict->SetStringWithoutPathExpansion("file", file_path); + upload_data_dict->SetKey("file", base::Value(file_path)); } else { const storage::UploadBlobElementReader* blob_reader = static_cast(reader.get());