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

Side by Side Diff: chrome/browser/ui/browser_command_controller.cc

Issue 10990026: Disable history menu in incognito or guest mode (Closed) Base URL: http://git.chromium.org/chromium/src.git@new
Patch Set: Use Profile::IsGuestSession() Created 8 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser_command_controller.h" 5 #include "chrome/browser/ui/browser_command_controller.h"
6 6
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/defaults.h" 9 #include "chrome/browser/defaults.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 command_updater_.UpdateCommandEnabled(IDC_ZOOM_MENU, true); 827 command_updater_.UpdateCommandEnabled(IDC_ZOOM_MENU, true);
828 command_updater_.UpdateCommandEnabled(IDC_ZOOM_PLUS, true); 828 command_updater_.UpdateCommandEnabled(IDC_ZOOM_PLUS, true);
829 command_updater_.UpdateCommandEnabled(IDC_ZOOM_NORMAL, true); 829 command_updater_.UpdateCommandEnabled(IDC_ZOOM_NORMAL, true);
830 command_updater_.UpdateCommandEnabled(IDC_ZOOM_MINUS, true); 830 command_updater_.UpdateCommandEnabled(IDC_ZOOM_MINUS, true);
831 831
832 // Show various bits of UI 832 // Show various bits of UI
833 UpdateOpenFileState(); 833 UpdateOpenFileState();
834 command_updater_.UpdateCommandEnabled(IDC_CREATE_SHORTCUTS, false); 834 command_updater_.UpdateCommandEnabled(IDC_CREATE_SHORTCUTS, false);
835 UpdateCommandsForDevTools(); 835 UpdateCommandsForDevTools();
836 command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, CanOpenTaskManager()); 836 command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, CanOpenTaskManager());
837 command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY, true); 837 command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY,
838 !Profile::IsGuestSession());
838 command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true); 839 command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true);
839 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_KEYBOARD, true); 840 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_KEYBOARD, true);
840 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_MENU, true); 841 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_MENU, true);
841 command_updater_.UpdateCommandEnabled(IDC_BOOKMARKS_MENU, true); 842 command_updater_.UpdateCommandEnabled(IDC_BOOKMARKS_MENU, true);
842 843
843 command_updater_.UpdateCommandEnabled( 844 command_updater_.UpdateCommandEnabled(
844 IDC_SHOW_SYNC_SETUP, profile()->GetOriginalProfile()->IsSyncAccessible()); 845 IDC_SHOW_SYNC_SETUP, profile()->GetOriginalProfile()->IsSyncAccessible());
845 846
846 // Initialize other commands based on the window type. 847 // Initialize other commands based on the window type.
847 bool normal_window = browser_->is_type_tabbed(); 848 bool normal_window = browser_->is_type_tabbed();
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 1166
1166 BrowserWindow* BrowserCommandController::window() { 1167 BrowserWindow* BrowserCommandController::window() {
1167 return browser_->window(); 1168 return browser_->window();
1168 } 1169 }
1169 1170
1170 Profile* BrowserCommandController::profile() { 1171 Profile* BrowserCommandController::profile() {
1171 return browser_->profile(); 1172 return browser_->profile();
1172 } 1173 }
1173 1174
1174 } // namespace chrome 1175 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698