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 a7406ad0ff8f434b1e73a0779cdfef9cadd1564d..60cdd41628183f977c43becc80ba8bc9d30193c3 100644 |
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc |
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc |
@@ -693,20 +693,8 @@ string16 AutofillDialogControllerImpl::LegalDocumentsText() { |
return legal_documents_text_; |
} |
-DialogSignedInState AutofillDialogControllerImpl::SignedInState() const { |
- if (wallet_error_notification_) |
- 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 { |
@@ -871,6 +859,23 @@ void AutofillDialogControllerImpl::HideSignIn() { |
view_->UpdateAccountChooser(); |
} |
+AutofillDialogControllerImpl::DialogSignedInState |
+ AutofillDialogControllerImpl::SignedInState() const { |
+ if (wallet_error_notification_) |
+ 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: |