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

Unified Diff: chrome/browser/ui/ash/launcher/launcher_context_menu.cc

Issue 11471027: Added more tests for IncognitoModeAvailability. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add render_view_context_menu_test_util to unit_test and browser_tests. Created 7 years, 11 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/ash/launcher/launcher_context_menu.cc
diff --git a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
index 9f28cb2e220e16c4cf0a5e2a06dcbec4a9c9c230..03543ac42e73f98db623230ee080d3e048eb33ba 100644
--- a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
@@ -131,7 +131,10 @@ void LauncherContextMenu::Init() {
// Don't show the auto-hide menu item while in immersive mode because the
// launcher always auto-hides in this mode and it's confusing when the
// preference appears not to apply.
- if (!ash::GetRootWindowController(root_window_)->IsImmersiveMode()) {
+ ash::internal::RootWindowController* root_window_controller =
+ ash::GetRootWindowController(root_window_);
+ if (root_window_controller != NULL &&
+ !root_window_controller->IsImmersiveMode()) {
AddCheckItemWithStringId(
MENU_AUTO_HIDE, IDS_AURA_LAUNCHER_CONTEXT_MENU_AUTO_HIDE);
}

Powered by Google App Engine
This is Rietveld 408576698