Replace somemore uses of SetStringWithoutPathExpansion

This commit is contained in:
deepak1556 2017-11-27 13:28:49 +05:30 committed by Cheng Zhao
parent 69ca6ccdc1
commit d846c9006e
2 changed files with 6 additions and 6 deletions

View file

@ -221,16 +221,16 @@ Converter<scoped_refptr<ResourceRequestBody>>::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<int>(element.offset()));
post_data_dict->SetInteger("length", static_cast<int>(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<int>(element.offset()));
post_data_dict->SetInteger("length", static_cast<int>(element.length()));
post_data_dict->SetDouble(

View file

@ -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<base::ListValue> 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<storage::UploadBlobElementReader*>(reader.get());