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

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: Add tests and link UpdateLogin to kSigninAllowed pref. 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 6956729ee736ccf0d0f93985adef7ddee38169a3..a598bb9e687b9a00243eed1e060288c479261a56 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -536,11 +536,13 @@ void WrenchMenuModel::Build(bool is_new_menu, bool supports_new_separators) {
#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()) {
+ 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