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

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: and a few fewer unnecessary checks 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
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..72e7c30f48a6ae30ac7fa53810f4d636829e2baf 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -954,7 +954,8 @@ 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();
msw 2015/05/21 04:34:43 Should this code instead [D]CHECK against this if
Mike Lerman 2015/05/21 15:27:31 What happens on Mac (or Linux I think) when there'
msw 2015/05/21 17:48:12 I'm not entirely sure. Outside tests, it looks lik
Mike Lerman 2015/05/21 19:24:33 DCHECK added.
const bool normal_window = browser_->is_type_tabbed();
UpdateOpenFileState(&command_updater_);
command_updater_.UpdateCommandEnabled(IDC_CREATE_SHORTCUTS, false);
@@ -1193,6 +1194,7 @@ void BrowserCommandController::UpdateCommandsForBookmarkBar() {
command_updater_.UpdateCommandEnabled(
IDC_SHOW_BOOKMARK_BAR,
browser_defaults::bookmarks_enabled && !profile()->IsGuestSession() &&
+ !profile()->IsGuestSession() &&
msw 2015/05/21 04:34:43 ditto
Mike Lerman 2015/05/21 15:27:31 changed to system
!profile()->GetPrefs()->IsManagedPreference(
bookmarks::prefs::kShowBookmarkBar) &&
IsShowingMainUI());

Powered by Google App Engine
This is Rietveld 408576698