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

Unified Diff: chrome/browser/ui/toolbar/toolbar_actions_model.cc

Issue 2450633004: Make ToolbarActionsModel ignore calls to AddComponentAction() before initialization (Closed)
Patch Set: Add a TODO Created 4 years, 1 month 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/toolbar/toolbar_actions_model.cc
diff --git a/chrome/browser/ui/toolbar/toolbar_actions_model.cc b/chrome/browser/ui/toolbar/toolbar_actions_model.cc
index 3d586be3b35bc29fd88fcaef625f1948720e7720..bdf9afb99d4011dcb5bae5c8f5856709c84b196d 100644
--- a/chrome/browser/ui/toolbar/toolbar_actions_model.cc
+++ b/chrome/browser/ui/toolbar/toolbar_actions_model.cc
@@ -635,6 +635,11 @@ bool ToolbarActionsModel::HasComponentAction(
}
void ToolbarActionsModel::AddComponentAction(const std::string& action_id) {
+ if (!actions_initialized_) {
+ // TODO(crbug.com/660972): Add these component actions at initialization.
+ return;
+ }
+
DCHECK(use_redesign_);
ToolbarItem component_item(action_id, COMPONENT_ACTION);
DCHECK(!HasItem(component_item));
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_actions_model.h ('k') | chrome/browser/ui/toolbar/toolbar_actions_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698