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

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: Unit tests 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..aec434a8e2630c7afd9b59ed937750db78e43e87 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -1275,6 +1275,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)) {
+ lock_button_->SetState(views::Button::STATE_DISABLED);
+ }
+
layout->StartRow(1, 0);
layout->AddView(lock_button_);
}

Powered by Google App Engine
This is Rietveld 408576698