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

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

Issue 566933005: Do not display lock for hosted domains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hide rather than disable lock for hd users Created 6 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/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_);
}

Powered by Google App Engine
This is Rietveld 408576698