Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc

Issue 23806002: [rAc] Disable sign-in link while the user's signed-in state is unknown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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:
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_controller_impl.h ('k') | chrome/browser/ui/autofill/autofill_dialog_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698