Skip to content

Commit

Permalink
M101: Prevent multiple SelectFileDialog in SessionLogHandler
Browse files Browse the repository at this point in the history
Similar to crrev.com/c/3546821

(cherry picked from commit a7a8ff2)

Bug: 1305068
Change-Id: I5d7cb86d868e31683db94249a3896448178bd334
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3561204
Auto-Submit: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org>
Commit-Queue: Zentaro Kavanagh <zentaro@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#987684}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3581507
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/branch-heads/4951@{#1054}
Cr-Branched-From: 27de622-refs/heads/main@{#982481}
  • Loading branch information
Luciano Pacheco authored and Chromium LUCI CQ committed Apr 26, 2022
1 parent dba81c6 commit 28e187e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ash/webui/diagnostics_ui/backend/session_log_handler.cc
Expand Up @@ -192,6 +192,9 @@ void SessionLogHandler::HandleSaveSessionLogRequest(
web_contents ? web_contents->GetTopLevelNativeWindow()
: gfx::kNullNativeWindow;

// Early return if the select file dialog is already active.
if (select_file_dialog_)
return;
select_file_dialog_ = ui::SelectFileDialog::Create(
this, select_file_policy_creator_.Run(web_contents));
select_file_dialog_->SelectFile(
Expand Down

0 comments on commit 28e187e

Please sign in to comment.