• Elly Fong-Jones's avatar
    cbuiv: remove some more DialogDelegate closure overrides · e44fc9de
    Elly Fong-Jones authored
    The ones in this CL are all fairly simple:
    
    * PasswordReuseModalWarningDialog calls an internal callback in all three cases.
      The cases are *almost* simple enough to wrap them up directly like:
    
        set_accept_callback(base::BindOnce(
            done_callback_, WarningAction::CHANGE_PASSWORD));
    
      except that doing this creates multiple copies of done_callback_, which is a
      no-no since it is a OnceCallback. The fact that it actually is logically only
      invoked once but that this is invisible to the type system is annoying.
    * SendTabToSelfBubbleViewImpl pointlessly overrode Close() to call Cancel(),
      which is what happens anyway when there are no buttons.
    * SessionCrashedBubbleView had simple overrides that invoked methods on itself
      and then returned true, so these are just inlined now.
    * SettingsResetPromptDialog just called into its controller and returned true in
      all three cases, so these are now inlined.
    * StoragePressureBubbleView does some stuff and unconditionally returns true, so
      it now has the OnDialogAccepted pattern, but probably not in a way that will
      ever be factored out fully.
    * TabModalConfirmDialogViews just calls its delegate in all three cases, so
      these are inlined.
    
    Bug: 1011446
    Change-Id: Ic736fbbf8e2e43ecefcdd3c0e890bc20ee0cc10f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2028171
    Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
    Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#736595}
    e44fc9de
settings_reset_prompt_dialog.h 1.61 KB