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 13521e65a0cde7acc9ac5650856fe1c0e5aeee6c..8358d218b558f547e11091e9b982af3ab08e6073 100644 |
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
@@ -887,7 +887,9 @@ views::View* ProfileChooserView::CreateProfileChooserView( |
const AvatarMenu::Item& item = avatar_menu->GetItemAt(i); |
if (item.active) { |
option_buttons_view = CreateOptionsView( |
- switches::IsNewProfileManagement() && item.signed_in); |
+ switches::IsNewProfileManagement() && item.signed_in && |
+ browser_->profile()->GetPrefs()->GetBoolean( |
+ prefs::kProfileIsLockable)); |
current_profile_view = CreateCurrentProfileView(item, false); |
if (view_mode_ == profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER) { |
switch (tutorial_mode_) { |
@@ -1275,6 +1277,12 @@ views::View* ProfileChooserView::CreateOptionsView(bool display_lock) { |
this, |
l10n_util::GetStringUTF16(IDS_PROFILES_PROFILE_SIGNOUT_BUTTON), |
*rb->GetImageSkiaNamed(IDR_ICON_PROFILES_MENU_LOCK)); |
+ |
+ if (!browser_->profile()->GetPrefs()->GetBoolean( |
+ prefs::kProfileIsLockable)) { |
noms (inactive)
2014/09/17 19:12:06
nit: wrong indent
Mike Lerman
2014/09/17 19:45:36
I should just start using git cl format.
|
+ lock_button_->SetState(views::Button::STATE_DISABLED); |
+ } |
+ |
layout->StartRow(1, 0); |
layout->AddView(lock_button_); |
} |