| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (prompt_->type() == InstallPromptData::UNSET_PROMPT_TYPE) {this and ConfirmReEnable are *only* called from CrxInstaller, which is always passed an unset type. Would it make sense to CHECK_EQ(UNSET_PROMPT_TYPE, prompt_->type()) here to verify that, and add a comment explaining it? (Ditto below)
Separately, I think it'd be great to refactor CrxInstaller to construct the ExtensionInstallPrompt closer to "on-demand", which avoids this -- but that's definitely not something to tackle in this CL.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (prompt_->type() == InstallPromptData::UNSET_PROMPT_TYPE) {this and ConfirmReEnable are *only* called from CrxInstaller, which is always passed an unset type. Would it make sense to CHECK_EQ(UNSET_PROMPT_TYPE, prompt_->type()) here to verify that, and add a comment explaining it? (Ditto below)
Separately, I think it'd be great to refactor CrxInstaller to construct the ExtensionInstallPrompt closer to "on-demand", which avoids this -- but that's definitely not something to tackle in this CL.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
const ShowDialogCallback& show_dialog_callback) {by this point, the prompt should always have a defined type, right? Can we CHECK that?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
@avi for //chrome/browser/download & //chrome/browser/infobars
by this point, the prompt should always have a defined type, right? Can we CHECK that?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Require InstallPromptData in ExtensionInstallPrompt constructors
Previously, ExtensionInstallPrompt accepted a nullable InstallPromptData
in its constructors and lazily created one in ConfirmInstall() and
ConfirmReEnable() when needed.
This could lead to confusing behavior where an ExtensionInstallPrompt was
constructed with an InstallPromptData instance, but later calls to other
ShowDialog() methods ignored the provided data.
This change makes InstallPromptData mandatory for all
ExtensionInstallPrompt constructors. For cases where the prompt type is
determined later (e.g. ConfirmInstall() and ConfirmReEnable()), it uses
UNSET_PROMPT_TYPE when creating a new InstallPromptData instance.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |