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

Unified Diff: chrome/browser/ui/toolbar/wrench_menu_model.cc

Issue 12088040: Add a SigninAllowed policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Some bugfixes. Created 7 years, 10 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/toolbar/wrench_menu_model.cc
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index 9eb883ff857d14c4e79918121db1dc66c50218b0..58989e8a27a944845cb6d08ad184ce10ca06a61f 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -535,12 +535,14 @@ void WrenchMenuModel::Build(bool is_new_menu, bool supports_new_separators) {
AddSeparator(ui::NORMAL_SEPARATOR);
#if !defined(OS_CHROMEOS)
- // No "Sign in to Chromium..." menu item on ChromeOS.
- const string16 short_product_name =
- l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME);
- AddItem(IDC_SHOW_SYNC_SETUP, l10n_util::GetStringFUTF16(
- IDS_SYNC_MENU_PRE_SYNCED_LABEL, short_product_name));
- AddSeparator(ui::NORMAL_SEPARATOR);
+ if (browser_->profile()->GetOriginalProfile()->IsSigninAllowed()) {
+ // No "Sign in to Chromium..." menu item on ChromeOS.
Andrew T Wilson (Slow) 2013/02/04 15:41:48 Move this comment one line up so it's clear it ref
Adrian Kuegel 2013/02/05 10:55:15 Done.
+ const string16 short_product_name =
+ l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME);
+ AddItem(IDC_SHOW_SYNC_SETUP, l10n_util::GetStringFUTF16(
+ IDS_SYNC_MENU_PRE_SYNCED_LABEL, short_product_name));
+ AddSeparator(ui::NORMAL_SEPARATOR);
+ }
#endif
AddItemWithStringId(IDC_OPTIONS, IDS_SETTINGS);

Powered by Google App Engine
This is Rietveld 408576698