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

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

Issue 16072010: Disable the sign-in command when incognito mode is forced. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« 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 "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/defaults.h" 10 #include "chrome/browser/defaults.h"
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 IDC_SHOW_BOOKMARK_MANAGER, 989 IDC_SHOW_BOOKMARK_MANAGER,
990 browser_defaults::bookmarks_enabled && command_enabled); 990 browser_defaults::bookmarks_enabled && command_enabled);
991 ExtensionService* extension_service = profile->GetExtensionService(); 991 ExtensionService* extension_service = profile->GetExtensionService();
992 bool enable_extensions = 992 bool enable_extensions =
993 extension_service && extension_service->extensions_enabled(); 993 extension_service && extension_service->extensions_enabled();
994 command_updater->UpdateCommandEnabled(IDC_MANAGE_EXTENSIONS, 994 command_updater->UpdateCommandEnabled(IDC_MANAGE_EXTENSIONS,
995 enable_extensions && command_enabled); 995 enable_extensions && command_enabled);
996 996
997 command_updater->UpdateCommandEnabled(IDC_IMPORT_SETTINGS, command_enabled); 997 command_updater->UpdateCommandEnabled(IDC_IMPORT_SETTINGS, command_enabled);
998 command_updater->UpdateCommandEnabled(IDC_OPTIONS, command_enabled); 998 command_updater->UpdateCommandEnabled(IDC_OPTIONS, command_enabled);
999 command_updater->UpdateCommandEnabled(IDC_SHOW_SIGNIN, command_enabled);
999 } 1000 }
1000 1001
1001 void BrowserCommandController::UpdateCommandsForIncognitoAvailability() { 1002 void BrowserCommandController::UpdateCommandsForIncognitoAvailability() {
1002 UpdateSharedCommandsForIncognitoAvailability(&command_updater_, profile()); 1003 UpdateSharedCommandsForIncognitoAvailability(&command_updater_, profile());
1003 1004
1004 if (!IsShowingMainUI()) { 1005 if (!IsShowingMainUI()) {
1005 command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, false); 1006 command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, false);
1006 command_updater_.UpdateCommandEnabled(IDC_OPTIONS, false); 1007 command_updater_.UpdateCommandEnabled(IDC_OPTIONS, false);
1007 } 1008 }
1008 } 1009 }
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 1261
1261 BrowserWindow* BrowserCommandController::window() { 1262 BrowserWindow* BrowserCommandController::window() {
1262 return browser_->window(); 1263 return browser_->window();
1263 } 1264 }
1264 1265
1265 Profile* BrowserCommandController::profile() { 1266 Profile* BrowserCommandController::profile() {
1266 return browser_->profile(); 1267 return browser_->profile();
1267 } 1268 }
1268 1269
1269 } // namespace chrome 1270 } // 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