| Index: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| index 450878109a89597df085498832a059a898b83da7..9f5a96308caabf380dd530543cf1506bceb29379 100644
|
| --- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| +++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| @@ -716,20 +716,8 @@ string16 AutofillDialogControllerImpl::LegalDocumentsText() {
|
| return legal_documents_text_;
|
| }
|
|
|
| -DialogSignedInState AutofillDialogControllerImpl::SignedInState() const {
|
| - if (account_chooser_model_.HadWalletError())
|
| - return SIGN_IN_DISABLED;
|
| -
|
| - if (signin_helper_ || !wallet_items_)
|
| - return REQUIRES_RESPONSE;
|
| -
|
| - if (wallet_items_->HasRequiredAction(wallet::GAIA_AUTH))
|
| - return REQUIRES_SIGN_IN;
|
| -
|
| - if (wallet_items_->HasRequiredAction(wallet::PASSIVE_GAIA_AUTH))
|
| - return REQUIRES_PASSIVE_SIGN_IN;
|
| -
|
| - return SIGNED_IN;
|
| +bool AutofillDialogControllerImpl::ShouldDisableSignInLink() const {
|
| + return SignedInState() == REQUIRES_RESPONSE;
|
| }
|
|
|
| bool AutofillDialogControllerImpl::ShouldShowSpinner() const {
|
| @@ -904,6 +892,22 @@ void AutofillDialogControllerImpl::HideSignIn() {
|
| view_->UpdateAccountChooser();
|
| }
|
|
|
| +DialogSignedInState AutofillDialogControllerImpl::SignedInState() const {
|
| + if (account_chooser_model_.HadWalletError())
|
| + return SIGN_IN_DISABLED;
|
| +
|
| + if (signin_helper_ || !wallet_items_)
|
| + return REQUIRES_RESPONSE;
|
| +
|
| + if (wallet_items_->HasRequiredAction(wallet::GAIA_AUTH))
|
| + return REQUIRES_SIGN_IN;
|
| +
|
| + if (wallet_items_->HasRequiredAction(wallet::PASSIVE_GAIA_AUTH))
|
| + return REQUIRES_PASSIVE_SIGN_IN;
|
| +
|
| + return SIGNED_IN;
|
| +}
|
| +
|
| void AutofillDialogControllerImpl::SignedInStateUpdated() {
|
| switch (SignedInState()) {
|
| case SIGNED_IN:
|
|
|