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

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

Issue 497783002: Disable lock if no credentials are present (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Return [false] if profile_index = ::npos 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
« no previous file with comments | « chrome/browser/ui/views/profiles/profile_chooser_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 752dc6637e0fd729c821d827bb97efd71134d594..daa5f4165c3a83845e68ab24b22e948388745d42 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/profiles/profile_metrics.h"
#include "chrome/browser/profiles/profile_window.h"
#include "chrome/browser/profiles/profiles_state.h"
+#include "chrome/browser/signin/local_auth.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
#include "chrome/browser/signin/signin_header_helper.h"
#include "chrome/browser/signin/signin_manager_factory.h"
@@ -1242,7 +1243,7 @@ views::View* ProfileChooserView::CreateOtherProfilesView(
return view;
}
-views::View* ProfileChooserView::CreateOptionsView(bool enable_lock) {
+views::View* ProfileChooserView::CreateOptionsView(bool display_lock) {
views::View* view = new views::View();
views::GridLayout* layout = CreateSingleColumnLayout(view, kFixedMenuWidth);
@@ -1269,7 +1270,7 @@ views::View* ProfileChooserView::CreateOptionsView(bool enable_lock) {
layout->AddView(go_incognito_button_);
}
- if (enable_lock) {
+ if (display_lock) {
layout->StartRow(1, 0);
layout->AddView(new views::Separator(views::Separator::HORIZONTAL));
@@ -1277,6 +1278,8 @@ views::View* ProfileChooserView::CreateOptionsView(bool enable_lock) {
this,
l10n_util::GetStringUTF16(IDS_PROFILES_PROFILE_SIGNOUT_BUTTON),
*rb->GetImageSkiaNamed(IDR_ICON_PROFILES_MENU_LOCK));
+ if (!chrome::LocalAuthCredentialsExist(browser_->profile()))
+ lock_button_->SetState(views::Button::STATE_DISABLED);
layout->StartRow(1, 0);
layout->AddView(lock_button_);
}
« no previous file with comments | « chrome/browser/ui/views/profiles/profile_chooser_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698