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

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

Issue 2823983003: Disable Clear Browsing Data menu item in guest profiles (Closed)
Patch Set: Enable in popup windows Created 3 years, 8 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, CanOpenTaskManager()); 791 command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, CanOpenTaskManager());
792 command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY, !guest_session); 792 command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY, !guest_session);
793 command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true); 793 command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true);
794 command_updater_.UpdateCommandEnabled(IDC_HELP_MENU, true); 794 command_updater_.UpdateCommandEnabled(IDC_HELP_MENU, true);
795 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_KEYBOARD, true); 795 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_KEYBOARD, true);
796 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_MENU, true); 796 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_MENU, true);
797 command_updater_.UpdateCommandEnabled(IDC_BOOKMARKS_MENU, !guest_session); 797 command_updater_.UpdateCommandEnabled(IDC_BOOKMARKS_MENU, !guest_session);
798 command_updater_.UpdateCommandEnabled(IDC_RECENT_TABS_MENU, 798 command_updater_.UpdateCommandEnabled(IDC_RECENT_TABS_MENU,
799 !guest_session && 799 !guest_session &&
800 !profile()->IsOffTheRecord()); 800 !profile()->IsOffTheRecord());
801 command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, normal_window); 801 command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA,
802 !guest_session);
802 #if defined(OS_CHROMEOS) 803 #if defined(OS_CHROMEOS)
803 command_updater_.UpdateCommandEnabled(IDC_TAKE_SCREENSHOT, true); 804 command_updater_.UpdateCommandEnabled(IDC_TAKE_SCREENSHOT, true);
804 command_updater_.UpdateCommandEnabled(IDC_TOUCH_HUD_PROJECTION_TOGGLE, true); 805 command_updater_.UpdateCommandEnabled(IDC_TOUCH_HUD_PROJECTION_TOGGLE, true);
805 #else 806 #else
806 // Chrome OS uses the system tray menu to handle multi-profiles. 807 // Chrome OS uses the system tray menu to handle multi-profiles.
807 if (normal_window && (guest_session || !profile()->IsOffTheRecord())) { 808 if (normal_window && (guest_session || !profile()->IsOffTheRecord())) {
808 command_updater_.UpdateCommandEnabled(IDC_SHOW_AVATAR_MENU, true); 809 command_updater_.UpdateCommandEnabled(IDC_SHOW_AVATAR_MENU, true);
809 } 810 }
810 #endif 811 #endif
811 812
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 1150
1150 BrowserWindow* BrowserCommandController::window() { 1151 BrowserWindow* BrowserCommandController::window() {
1151 return browser_->window(); 1152 return browser_->window();
1152 } 1153 }
1153 1154
1154 Profile* BrowserCommandController::profile() { 1155 Profile* BrowserCommandController::profile() {
1155 return browser_->profile(); 1156 return browser_->profile();
1156 } 1157 }
1157 1158
1158 } // namespace chrome 1159 } // 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