Index: chrome/browser/ui/toolbar/wrench_menu_model.cc |
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc |
index 625359402eed4d5f58e83ab2bd64939c0aca0cb5..27ef379474b8e9e51ca138bb21f22d3fb90df086 100644 |
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc |
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc |
@@ -36,7 +36,7 @@ |
#include "chrome/browser/ui/toolbar/bookmark_sub_menu_model.h" |
#include "chrome/browser/ui/toolbar/encoding_menu_controller.h" |
#include "chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h" |
-#include "chrome/browser/ui/toolbar/toolbar_actions_model.h" |
+#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" |
#include "chrome/browser/upgrade_detector.h" |
#include "chrome/common/chrome_paths.h" |
#include "chrome/common/chrome_switches.h" |
@@ -966,7 +966,9 @@ bool WrenchMenuModel::AddGlobalErrorMenuItems() { |
void WrenchMenuModel::CreateActionToolbarOverflowMenu() { |
// We only add the extensions overflow container if there are any icons that |
// aren't shown in the main container. |
- if (!ToolbarActionsModel::Get(browser_->profile())->all_icons_visible()) { |
+ // |browser_->window()| can be null during startup. |
Peter Kasting
2015/09/15 00:13:38
Nit: No || around a function call
Devlin
2015/09/15 18:22:39
Wasn't sure about this one, because it was a simpl
|
+ if (browser_->window() && |
+ browser_->window()->GetToolbarActionsBar()->NeedsOverflow()) { |
Peter Kasting
2015/09/15 00:13:38
We now have ToolbarActionsBar::NeedsOverflow() and
Devlin
2015/09/15 18:22:39
Documented in toolbar_actions_bar.h
|
#if defined(OS_MACOSX) |
// There's a bug in AppKit menus, where if a menu item with a custom view |
// (like the extensions overflow menu) is the first menu item, it is not |