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

Unified Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 479353003: Add IsAuthenticated() method to SigninManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 6 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/views/profiles/profile_chooser_view.cc
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
index d61b4838a944f5e38b2b154a740287fb437f33d8..aee21c821ba0fb7ac2c5df6fbfba25f23966d42c 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -744,12 +744,11 @@ void ProfileChooserView::ButtonPressed(views::Button* sender,
account_id_to_remove_.clear();
ShowView(profiles::BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT, avatar_menu_.get());
} else if (sender == gaia_signin_cancel_button_) {
- std::string primary_account =
- SigninManagerFactory::GetForProfile(browser_->profile())->
- GetAuthenticatedAccountId();
// The account management view is only available with the
// --enable-account-consistency flag.
- bool account_management_available = !primary_account.empty() &&
+ bool account_management_available =
+ SigninManagerFactory::GetForProfile(browser_->profile())->
+ IsAuthenticated() &&
switches::IsEnableAccountConsistency();
ShowView(account_management_available ?
profiles::BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT :
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_sync_starter.cc ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698