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

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: Fix compile Created 7 years, 4 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 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:

Powered by Google App Engine
This is Rietveld 408576698