refactor: have ShowSaveDialogSync() return a std::optional<base::FilePath> (#47428)
* refactor: have ShowSaveDialogSync() return a std::optional<base::FilePath> * fixup! refactor: have ShowSaveDialogSync() return a std::optional<base::FilePath>
This commit is contained in:
parent
0259abe920
commit
6f915e85e2
6 changed files with 57 additions and 46 deletions
|
@ -71,9 +71,8 @@ v8::Local<v8::Promise> ShowOpenDialog(
|
|||
|
||||
void ShowSaveDialogSync(const file_dialog::DialogSettings& settings,
|
||||
gin::Arguments* args) {
|
||||
base::FilePath path;
|
||||
if (file_dialog::ShowSaveDialogSync(settings, &path))
|
||||
args->Return(path);
|
||||
if (const auto path = file_dialog::ShowSaveDialogSync(settings))
|
||||
args->Return(*path);
|
||||
}
|
||||
|
||||
v8::Local<v8::Promise> ShowSaveDialog(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue