Commit 4c1d7692 authored by Devlin Cronin's avatar Devlin Cronin Committed by Commit Bot

[Extensions Menu] Strict-ify DCHECK in ToolbarActionsBar

The ToolbarActionsBar should never be constructed, at all, with the
kExtensionsToolbarMenu feature enabled. Make the DCHECK in the
ToolbarActionsBar constructor stricter to make this clear, and catch any
cases where we erroneously construct one.

Bug: None

Change-Id: I5ddef89f249435b0fcfe97459b5c09bd88936075
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1877449Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709133}
parent 82a5ca92
...@@ -113,8 +113,7 @@ ToolbarActionsBar::ToolbarActionsBar(ToolbarActionsBarDelegate* delegate, ...@@ -113,8 +113,7 @@ ToolbarActionsBar::ToolbarActionsBar(ToolbarActionsBarDelegate* delegate,
if (model_) // |model_| can be null in unittests. if (model_) // |model_| can be null in unittests.
model_observer_.Add(model_); model_observer_.Add(model_);
if (base::FeatureList::IsEnabled(features::kExtensionsToolbarMenu)) DCHECK(!base::FeatureList::IsEnabled(features::kExtensionsToolbarMenu));
DCHECK(!in_overflow_mode());
browser_->tab_strip_model()->AddObserver(this); browser_->tab_strip_model()->AddObserver(this);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment