ui::SelectFile: deprecate params [chromium/src : main]

0 views
Skip to first unread message

Elly FJ (Gerrit)

unread,
Jun 26, 2024, 8:18:00 PM (3 days ago) Jun 26
to Elly FJ, Scott Violet, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org, devtools...@chromium.org, Lei Zhang, Tommy Li, alandin...@chromium.org, alemat...@chromium.org, arc-review...@google.com, ashleydp+diag...@google.com, blundell+...@chromium.org, chlily...@chromium.org, chromium-a...@chromium.org, croissant-...@chromium.org, cros-print...@google.com, cros-setti...@google.com, crost...@chromium.org, djacob...@chromium.org, dmurph+wat...@chromium.org, dominickn+...@chromium.org, dpad+diagno...@google.com, druber...@chromium.org, dtraino...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ffred...@chromium.org, gavindodd+dia...@google.com, gavinwill+dia...@chromium.org, gavinwill+sc...@chromium.org, hidehik...@chromium.org, kinuko+...@chromium.org, mac-r...@chromium.org, michaelcheco+di...@google.com, michaelpg+wa...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org, tluk+...@chromium.org, webap...@microsoft.com, yhanada+...@chromium.org, zentaro+diag...@chromium.org, zentaro+sca...@chromium.org, zhangwenyu+dia...@google.com
Attention needed from Scott Violet

Elly FJ added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Elly FJ . resolved

sky: please have a look? if this looks good to you I'll ask an LSC reviewer to look at it because I had to touch a gazillion files.

Open in Gerrit

Related details

Attention is currently required from:
  • Scott Violet
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id876295714bd0c853506cc258b33e7d1886f1b94
Gerrit-Change-Number: 5659974
Gerrit-PatchSet: 1
Gerrit-Owner: Elly FJ <elly...@chromium.org>
Gerrit-Reviewer: Elly FJ <elly...@chromium.org>
Gerrit-Reviewer: Scott Violet <s...@chromium.org>
Gerrit-CC: Lei Zhang <the...@chromium.org>
Gerrit-CC: Tommy Li <tomm...@chromium.org>
Gerrit-Attention: Scott Violet <s...@chromium.org>
Gerrit-Comment-Date: Thu, 27 Jun 2024 00:17:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Scott Violet (Gerrit)

unread,
Jun 27, 2024, 2:20:38 PM (3 days ago) Jun 27
to Elly FJ, Scott Violet, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org, devtools...@chromium.org, Lei Zhang, Tommy Li, alandin...@chromium.org, alemat...@chromium.org, arc-review...@google.com, ashleydp+diag...@google.com, blundell+...@chromium.org, chlily...@chromium.org, chromium-a...@chromium.org, croissant-...@chromium.org, cros-print...@google.com, cros-setti...@google.com, crost...@chromium.org, djacob...@chromium.org, dmurph+wat...@chromium.org, dominickn+...@chromium.org, dpad+diagno...@google.com, druber...@chromium.org, dtraino...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ffred...@chromium.org, gavindodd+dia...@google.com, gavinwill+dia...@chromium.org, gavinwill+sc...@chromium.org, hidehik...@chromium.org, kinuko+...@chromium.org, mac-r...@chromium.org, michaelcheco+di...@google.com, michaelpg+wa...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org, tluk+...@chromium.org, webap...@microsoft.com, yhanada+...@chromium.org, zentaro+diag...@chromium.org, zentaro+sca...@chromium.org, zhangwenyu+dia...@google.com
Attention needed from Elly FJ

Scott Violet voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Elly FJ
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id876295714bd0c853506cc258b33e7d1886f1b94
Gerrit-Change-Number: 5659974
Gerrit-PatchSet: 2
Gerrit-Owner: Elly FJ <elly...@chromium.org>
Gerrit-Reviewer: Elly FJ <elly...@chromium.org>
Gerrit-Reviewer: Scott Violet <s...@chromium.org>
Gerrit-CC: Lei Zhang <the...@chromium.org>
Gerrit-CC: Tommy Li <tomm...@chromium.org>
Gerrit-Attention: Elly FJ <elly...@chromium.org>
Gerrit-Comment-Date: Thu, 27 Jun 2024 18:20:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Elly FJ (Gerrit)

unread,
Jun 27, 2024, 3:32:25 PM (3 days ago) Jun 27
to Elly FJ, Avi Drissman, Joe Downing, Scott Violet, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org, devtools...@chromium.org, Lei Zhang, Tommy Li, alandin...@chromium.org, alemat...@chromium.org, arc-review...@google.com, ashleydp+diag...@google.com, blundell+...@chromium.org, chlily...@chromium.org, chromium-a...@chromium.org, croissant-...@chromium.org, cros-print...@google.com, cros-setti...@google.com, crost...@chromium.org, djacob...@chromium.org, dmurph+wat...@chromium.org, dominickn+...@chromium.org, dpad+diagno...@google.com, druber...@chromium.org, dtraino...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ffred...@chromium.org, gavindodd+dia...@google.com, gavinwill+dia...@chromium.org, gavinwill+sc...@chromium.org, hidehik...@chromium.org, kinuko+...@chromium.org, mac-r...@chromium.org, michaelcheco+di...@google.com, michaelpg+wa...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org, tluk+...@chromium.org, webap...@microsoft.com, yhanada+...@chromium.org, zentaro+diag...@chromium.org, zentaro+sca...@chromium.org, zhangwenyu+dia...@google.com
Attention needed from Avi Drissman, Joe Downing and Scott Violet

Elly FJ added 1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Elly FJ . resolved

avi: please have a look as a //content owner?
joedow: please have a look as a //remoting owner?

thanks both!

Open in Gerrit

Related details

Attention is currently required from:
  • Avi Drissman
  • Joe Downing
  • Scott Violet
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id876295714bd0c853506cc258b33e7d1886f1b94
Gerrit-Change-Number: 5659974
Gerrit-PatchSet: 3
Gerrit-Owner: Elly FJ <elly...@chromium.org>
Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
Gerrit-Reviewer: Elly FJ <elly...@chromium.org>
Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
Gerrit-Reviewer: Scott Violet <s...@chromium.org>
Gerrit-CC: Lei Zhang <the...@chromium.org>
Gerrit-CC: Tommy Li <tomm...@chromium.org>
Gerrit-Attention: Avi Drissman <a...@chromium.org>
Gerrit-Attention: Scott Violet <s...@chromium.org>
Gerrit-Attention: Joe Downing <joe...@chromium.org>
Gerrit-Comment-Date: Thu, 27 Jun 2024 19:32:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Joe Downing (Gerrit)

unread,
Jun 27, 2024, 3:33:22 PM (3 days ago) Jun 27
to Elly FJ, Avi Drissman, Scott Violet, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org, devtools...@chromium.org, Lei Zhang, Tommy Li, alandin...@chromium.org, alemat...@chromium.org, arc-review...@google.com, ashleydp+diag...@google.com, blundell+...@chromium.org, chlily...@chromium.org, chromium-a...@chromium.org, croissant-...@chromium.org, cros-print...@google.com, cros-setti...@google.com, crost...@chromium.org, djacob...@chromium.org, dmurph+wat...@chromium.org, dominickn+...@chromium.org, dpad+diagno...@google.com, druber...@chromium.org, dtraino...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ffred...@chromium.org, gavindodd+dia...@google.com, gavinwill+dia...@chromium.org, gavinwill+sc...@chromium.org, hidehik...@chromium.org, kinuko+...@chromium.org, mac-r...@chromium.org, michaelcheco+di...@google.com, michaelpg+wa...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org, tluk+...@chromium.org, webap...@microsoft.com, yhanada+...@chromium.org, zentaro+diag...@chromium.org, zentaro+sca...@chromium.org, zhangwenyu+dia...@google.com
Attention needed from Avi Drissman, Elly FJ and Scott Violet

Joe Downing voted and added 1 comment

Votes added by Joe Downing

Code-Review+1

1 comment

Patchset-level comments
Joe Downing . resolved

single remoting file lgtm : )

Open in Gerrit

Related details

Attention is currently required from:
  • Avi Drissman
  • Elly FJ
  • Scott Violet
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id876295714bd0c853506cc258b33e7d1886f1b94
Gerrit-Change-Number: 5659974
Gerrit-PatchSet: 3
Gerrit-Owner: Elly FJ <elly...@chromium.org>
Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
Gerrit-Reviewer: Elly FJ <elly...@chromium.org>
Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
Gerrit-Reviewer: Scott Violet <s...@chromium.org>
Gerrit-CC: Lei Zhang <the...@chromium.org>
Gerrit-CC: Tommy Li <tomm...@chromium.org>
Gerrit-Attention: Avi Drissman <a...@chromium.org>
Gerrit-Attention: Elly FJ <elly...@chromium.org>
Gerrit-Attention: Scott Violet <s...@chromium.org>
Gerrit-Comment-Date: Thu, 27 Jun 2024 19:33:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Joe Downing (Gerrit)

unread,
Jun 27, 2024, 4:26:09 PM (3 days ago) Jun 27
to Elly FJ, Avi Drissman, Scott Violet, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org, devtools...@chromium.org, Lei Zhang, Tommy Li, alandin...@chromium.org, alemat...@chromium.org, arc-review...@google.com, ashleydp+diag...@google.com, blundell+...@chromium.org, chlily...@chromium.org, chromium-a...@chromium.org, croissant-...@chromium.org, cros-print...@google.com, cros-setti...@google.com, crost...@chromium.org, djacob...@chromium.org, dmurph+wat...@chromium.org, dominickn+...@chromium.org, dpad+diagno...@google.com, druber...@chromium.org, dtraino...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ffred...@chromium.org, gavindodd+dia...@google.com, gavinwill+dia...@chromium.org, gavinwill+sc...@chromium.org, hidehik...@chromium.org, kinuko+...@chromium.org, mac-r...@chromium.org, michaelcheco+di...@google.com, michaelpg+wa...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org, tluk+...@chromium.org, webap...@microsoft.com, yhanada+...@chromium.org, zentaro+diag...@chromium.org, zentaro+sca...@chromium.org, zhangwenyu+dia...@google.com
Attention needed from Avi Drissman, Elly FJ and Scott Violet

Joe Downing voted and added 1 comment

Votes added by Joe Downing

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Joe Downing . resolved

lgtm for remoting, again :P

Open in Gerrit

Related details

Attention is currently required from:
  • Avi Drissman
  • Elly FJ
  • Scott Violet
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id876295714bd0c853506cc258b33e7d1886f1b94
Gerrit-Change-Number: 5659974
Gerrit-PatchSet: 4
Gerrit-Owner: Elly FJ <elly...@chromium.org>
Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
Gerrit-Reviewer: Elly FJ <elly...@chromium.org>
Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
Gerrit-Reviewer: Scott Violet <s...@chromium.org>
Gerrit-CC: Lei Zhang <the...@chromium.org>
Gerrit-CC: Tommy Li <tomm...@chromium.org>
Gerrit-Attention: Avi Drissman <a...@chromium.org>
Gerrit-Attention: Elly FJ <elly...@chromium.org>
Gerrit-Attention: Scott Violet <s...@chromium.org>
Gerrit-Comment-Date: Thu, 27 Jun 2024 20:25:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Avi Drissman (Gerrit)

unread,
Jun 27, 2024, 4:57:37 PM (3 days ago) Jun 27
to Elly FJ, Joe Downing, Avi Drissman, Scott Violet, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org, devtools...@chromium.org, Lei Zhang, Tommy Li, alandin...@chromium.org, alemat...@chromium.org, arc-review...@google.com, ashleydp+diag...@google.com, blundell+...@chromium.org, chlily...@chromium.org, chromium-a...@chromium.org, croissant-...@chromium.org, cros-print...@google.com, cros-setti...@google.com, crost...@chromium.org, djacob...@chromium.org, dmurph+wat...@chromium.org, dominickn+...@chromium.org, dpad+diagno...@google.com, druber...@chromium.org, dtraino...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ffred...@chromium.org, gavindodd+dia...@google.com, gavinwill+dia...@chromium.org, gavinwill+sc...@chromium.org, hidehik...@chromium.org, kinuko+...@chromium.org, mac-r...@chromium.org, michaelcheco+di...@google.com, michaelpg+wa...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org, tluk+...@chromium.org, webap...@microsoft.com, yhanada+...@chromium.org, zentaro+diag...@chromium.org, zentaro+sca...@chromium.org, zhangwenyu+dia...@google.com
Attention needed from Elly FJ and Scott Violet

Avi Drissman added 1 comment

File ui/shell_dialogs/select_file_dialog.h
Line 76, Patchset 4 (Latest): virtual void FileSelected(const SelectedFileInfo& file, int index) {}
Avi Drissman . unresolved

The `= 0` for this and for `FileSelectionCanceled` below were deliberate. If you wanted to do a file picker, you had to provide a success callback and a failure callback. If callers wanted to do nothing, they had to explicitly do nothing. This also made it harder to use the class wrong.

Open in Gerrit

Related details

Attention is currently required from:
  • Elly FJ
  • Scott Violet
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Id876295714bd0c853506cc258b33e7d1886f1b94
    Gerrit-Change-Number: 5659974
    Gerrit-PatchSet: 4
    Gerrit-Owner: Elly FJ <elly...@chromium.org>
    Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
    Gerrit-Reviewer: Elly FJ <elly...@chromium.org>
    Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
    Gerrit-Reviewer: Scott Violet <s...@chromium.org>
    Gerrit-CC: Lei Zhang <the...@chromium.org>
    Gerrit-CC: Tommy Li <tomm...@chromium.org>
    Gerrit-Attention: Elly FJ <elly...@chromium.org>
    Gerrit-Attention: Scott Violet <s...@chromium.org>
    Gerrit-Comment-Date: Thu, 27 Jun 2024 20:57:21 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Elly FJ (Gerrit)

    unread,
    Jun 27, 2024, 5:07:08 PM (3 days ago) Jun 27
    to Elly FJ, Joe Downing, Avi Drissman, Scott Violet, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org, devtools...@chromium.org, Lei Zhang, Tommy Li, alandin...@chromium.org, alemat...@chromium.org, arc-review...@google.com, ashleydp+diag...@google.com, blundell+...@chromium.org, chlily...@chromium.org, chromium-a...@chromium.org, croissant-...@chromium.org, cros-print...@google.com, cros-setti...@google.com, crost...@chromium.org, djacob...@chromium.org, dmurph+wat...@chromium.org, dominickn+...@chromium.org, dpad+diagno...@google.com, druber...@chromium.org, dtraino...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ffred...@chromium.org, gavindodd+dia...@google.com, gavinwill+dia...@chromium.org, gavinwill+sc...@chromium.org, hidehik...@chromium.org, kinuko+...@chromium.org, mac-r...@chromium.org, michaelcheco+di...@google.com, michaelpg+wa...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org, tluk+...@chromium.org, webap...@microsoft.com, yhanada+...@chromium.org, zentaro+diag...@chromium.org, zentaro+sca...@chromium.org, zhangwenyu+dia...@google.com
    Attention needed from Avi Drissman and Scott Violet

    Elly FJ added 1 comment

    File ui/shell_dialogs/select_file_dialog.h
    Line 76, Patchset 4 (Latest): virtual void FileSelected(const SelectedFileInfo& file, int index) {}
    Avi Drissman . unresolved

    The `= 0` for this and for `FileSelectionCanceled` below were deliberate. If you wanted to do a file picker, you had to provide a success callback and a failure callback. If callers wanted to do nothing, they had to explicitly do nothing. This also made it harder to use the class wrong.

    Elly FJ

    Because it makes it harder to forget to handle cancellation, you mean? That makes sense. I can put the `= 0` back, but it makes this CL uglier, and opens up a design problem: if I make `FileSelectionCanceled(void* params)` unimplemented, then every subclass will continue to have to implement it, even those that don't use params (which is most of them). If I make `FileSelectionCanceled()` unimplemented, then subclasses that *do* use `params` and have a `FileSelectionCanceled(void* params)` implementation, which presumably doesn't call `FileSelectionCanceled()`, will have to have an empty implementation of `FileSelectionCanceled()` which is never called.

    So, because of that, I prefer not to `= 0` either of these functions. Some client classes also genuinely don't care about cancellation (eg `FolderSelectionDialogController`), and it seems unlikely that someone will accidentally not implement `FileSelected()` and not notice, so I don't know how much the harder-to-misuse concern bothers me.

    What do you think?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Avi Drissman
    • Scott Violet
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Id876295714bd0c853506cc258b33e7d1886f1b94
    Gerrit-Change-Number: 5659974
    Gerrit-PatchSet: 4
    Gerrit-Owner: Elly FJ <elly...@chromium.org>
    Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
    Gerrit-Reviewer: Elly FJ <elly...@chromium.org>
    Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
    Gerrit-Reviewer: Scott Violet <s...@chromium.org>
    Gerrit-CC: Lei Zhang <the...@chromium.org>
    Gerrit-CC: Tommy Li <tomm...@chromium.org>
    Gerrit-Attention: Avi Drissman <a...@chromium.org>
    Gerrit-Attention: Scott Violet <s...@chromium.org>
    Gerrit-Comment-Date: Thu, 27 Jun 2024 21:06:55 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Avi Drissman <a...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Avi Drissman (Gerrit)

    unread,
    Jun 28, 2024, 10:52:49 AM (2 days ago) Jun 28
    to Elly FJ, Avi Drissman, Joe Downing, Scott Violet, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org, devtools...@chromium.org, Lei Zhang, Tommy Li, alandin...@chromium.org, alemat...@chromium.org, arc-review...@google.com, ashleydp+diag...@google.com, blundell+...@chromium.org, chlily...@chromium.org, chromium-a...@chromium.org, croissant-...@chromium.org, cros-print...@google.com, cros-setti...@google.com, crost...@chromium.org, djacob...@chromium.org, dmurph+wat...@chromium.org, dominickn+...@chromium.org, dpad+diagno...@google.com, druber...@chromium.org, dtraino...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ffred...@chromium.org, gavindodd+dia...@google.com, gavinwill+dia...@chromium.org, gavinwill+sc...@chromium.org, hidehik...@chromium.org, kinuko+...@chromium.org, mac-r...@chromium.org, michaelcheco+di...@google.com, michaelpg+wa...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org, tluk+...@chromium.org, webap...@microsoft.com, yhanada+...@chromium.org, zentaro+diag...@chromium.org, zentaro+sca...@chromium.org, zhangwenyu+dia...@google.com
    Attention needed from Elly FJ and Scott Violet

    Avi Drissman voted and added 1 comment

    Votes added by Avi Drissman

    Code-Review+1

    1 comment

    File ui/shell_dialogs/select_file_dialog.h
    Line 76, Patchset 4 (Latest): virtual void FileSelected(const SelectedFileInfo& file, int index) {}
    Avi Drissman . unresolved

    The `= 0` for this and for `FileSelectionCanceled` below were deliberate. If you wanted to do a file picker, you had to provide a success callback and a failure callback. If callers wanted to do nothing, they had to explicitly do nothing. This also made it harder to use the class wrong.

    Elly FJ

    Because it makes it harder to forget to handle cancellation, you mean? That makes sense. I can put the `= 0` back, but it makes this CL uglier, and opens up a design problem: if I make `FileSelectionCanceled(void* params)` unimplemented, then every subclass will continue to have to implement it, even those that don't use params (which is most of them). If I make `FileSelectionCanceled()` unimplemented, then subclasses that *do* use `params` and have a `FileSelectionCanceled(void* params)` implementation, which presumably doesn't call `FileSelectionCanceled()`, will have to have an empty implementation of `FileSelectionCanceled()` which is never called.

    So, because of that, I prefer not to `= 0` either of these functions. Some client classes also genuinely don't care about cancellation (eg `FolderSelectionDialogController`), and it seems unlikely that someone will accidentally not implement `FileSelected()` and not notice, so I don't know how much the harder-to-misuse concern bothers me.

    What do you think?

    Avi Drissman

    Fair points. Some of that seems to be unfortunate consequences of handling the migration, and I don’t want to press there. You are right in that this is straightforward enough for callers to probably get right.

    I thought there was a point in my earlier refactor in which that `=0` found a test that had meaningfully forgotten to handle the cancellation case, but I’m not finding it. If so, then I’m OK with this, as it doesn’t seem to be an issue in practice.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Elly FJ
    • Scott Violet
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Id876295714bd0c853506cc258b33e7d1886f1b94
    Gerrit-Change-Number: 5659974
    Gerrit-PatchSet: 4
    Gerrit-Owner: Elly FJ <elly...@chromium.org>
    Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
    Gerrit-Reviewer: Elly FJ <elly...@chromium.org>
    Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
    Gerrit-Reviewer: Scott Violet <s...@chromium.org>
    Gerrit-CC: Lei Zhang <the...@chromium.org>
    Gerrit-CC: Tommy Li <tomm...@chromium.org>
    Gerrit-Attention: Elly FJ <elly...@chromium.org>
    Gerrit-Attention: Scott Violet <s...@chromium.org>
    Gerrit-Comment-Date: Fri, 28 Jun 2024 14:52:36 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Avi Drissman <a...@chromium.org>
    Comment-In-Reply-To: Elly FJ <elly...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages