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

Side by Side 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: Extract managed user specific stuff into another changelist. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" 5 #include "chrome/browser/ui/toolbar/wrench_menu_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 CreateZoomMenu(is_new_menu); 529 CreateZoomMenu(is_new_menu);
530 else 530 else
531 AddSeparator(ui::NORMAL_SEPARATOR); 531 AddSeparator(ui::NORMAL_SEPARATOR);
532 532
533 AddItemWithStringId(IDC_SHOW_HISTORY, IDS_SHOW_HISTORY); 533 AddItemWithStringId(IDC_SHOW_HISTORY, IDS_SHOW_HISTORY);
534 AddItemWithStringId(IDC_SHOW_DOWNLOADS, IDS_SHOW_DOWNLOADS); 534 AddItemWithStringId(IDC_SHOW_DOWNLOADS, IDS_SHOW_DOWNLOADS);
535 AddSeparator(ui::NORMAL_SEPARATOR); 535 AddSeparator(ui::NORMAL_SEPARATOR);
536 536
537 #if !defined(OS_CHROMEOS) 537 #if !defined(OS_CHROMEOS)
538 // No "Sign in to Chromium..." menu item on ChromeOS. 538 // No "Sign in to Chromium..." menu item on ChromeOS.
539 const string16 short_product_name = 539 if (browser_->profile()->GetOriginalProfile()->IsSigninAllowed()) {
540 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME); 540 const string16 short_product_name =
541 AddItem(IDC_SHOW_SYNC_SETUP, l10n_util::GetStringFUTF16( 541 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME);
542 IDS_SYNC_MENU_PRE_SYNCED_LABEL, short_product_name)); 542 AddItem(IDC_SHOW_SYNC_SETUP, l10n_util::GetStringFUTF16(
543 AddSeparator(ui::NORMAL_SEPARATOR); 543 IDS_SYNC_MENU_PRE_SYNCED_LABEL, short_product_name));
544 AddSeparator(ui::NORMAL_SEPARATOR);
545 }
544 #endif 546 #endif
545 547
546 AddItemWithStringId(IDC_OPTIONS, IDS_SETTINGS); 548 AddItemWithStringId(IDC_OPTIONS, IDS_SETTINGS);
547 549
548 #if defined(OS_CHROMEOS) 550 #if defined(OS_CHROMEOS)
549 if (CommandLine::ForCurrentProcess()->HasSwitch( 551 if (CommandLine::ForCurrentProcess()->HasSwitch(
550 switches::kEnableRequestTabletSite)) 552 switches::kEnableRequestTabletSite))
551 AddCheckItemWithStringId(IDC_TOGGLE_REQUEST_TABLET_SITE, 553 AddCheckItemWithStringId(IDC_TOGGLE_REQUEST_TABLET_SITE,
552 IDS_TOGGLE_REQUEST_TABLET_SITE); 554 IDS_TOGGLE_REQUEST_TABLET_SITE);
553 #endif 555 #endif
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 browser_->tab_strip_model()->GetActiveWebContents()->GetZoomPercent( 696 browser_->tab_strip_model()->GetActiveWebContents()->GetZoomPercent(
695 &enable_increment, &enable_decrement); 697 &enable_increment, &enable_decrement);
696 } 698 }
697 zoom_label_ = l10n_util::GetStringFUTF16( 699 zoom_label_ = l10n_util::GetStringFUTF16(
698 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 700 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
699 } 701 }
700 702
701 void WrenchMenuModel::OnZoomLevelChanged(const std::string& host) { 703 void WrenchMenuModel::OnZoomLevelChanged(const std::string& host) {
702 UpdateZoomControls(); 704 UpdateZoomControls();
703 } 705 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698