• Elly Fong-Jones's avatar
    cbui: migrate ProfileSigninConfirmationDialogViews to set_button_label · 6c85a056
    Elly Fong-Jones authored
    This dialog had a two-phase construction to supply some state that
    logically was part of construction but was not yet available at
    construction time. This change collapses construction of this dialog
    into a single logical phase. Specifically:
    
    1) ProfileSigninConfirmationDialogViews::ShowDialog now defers
       construction of the dialog until after
       ui::CheckShouldPromptForNewProfile
    1) CheckShouldPromptForNewProfile now takes a base::OnceCallback instead
       of a base::Callback, to allow ownership of the
       ProfileSigninConfirmationDelegate to be passed through it
    3) ProfileSigninConfirmationDialogViews::Show now both constructs and
       shows the ProfileSigninConfirmationDialogViews, passing in the
       prompt_for_new_profile member
    4) The prompt_for_new_profile member is now made const
    5) That makes the return values of GetDialogButtonLabel also constant
       after construction, which opens up migration to set_button_label
    
    Bug: 1011446
    Change-Id: I975d425546db6e2d231f0003d38f0f3fac64ad88
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869489Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
    Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#707480}
    6c85a056
profile_signin_confirmation_helper.h 1.45 KB