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

Unified Diff: chrome/browser/ui/browser_command_controller.cc

Issue 1129293002: Fix the System Profile with extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove autogenerated actions Created 5 years, 7 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/startup/startup_browser_creator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_command_controller.cc
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index 570de3e90725c3d34d091445a5d418eab49342d7..ab25a9acb600d22fc0a6020a484a39ebc720ec66 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -954,7 +954,10 @@ void BrowserCommandController::InitCommandState() {
command_updater_.UpdateCommandEnabled(IDC_ZOOM_MINUS, true);
// Show various bits of UI
- const bool guest_session = profile()->IsGuestSession();
+ const bool guest_session = profile()->IsGuestSession() ||
+ profile()->IsSystemProfile();
+ DCHECK(!profile()->IsSystemProfile())
+ << "Ought to never have browser for the system profile.";
const bool normal_window = browser_->is_type_tabbed();
UpdateOpenFileState(&command_updater_);
command_updater_.UpdateCommandEnabled(IDC_CREATE_SHORTCUTS, false);
@@ -1193,6 +1196,7 @@ void BrowserCommandController::UpdateCommandsForBookmarkBar() {
command_updater_.UpdateCommandEnabled(
IDC_SHOW_BOOKMARK_BAR,
browser_defaults::bookmarks_enabled && !profile()->IsGuestSession() &&
+ !profile()->IsSystemProfile() &&
!profile()->GetPrefs()->IsManagedPreference(
bookmarks::prefs::kShowBookmarkBar) &&
IsShowingMainUI());
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/startup/startup_browser_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698