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

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

Issue 2539153003: Ensure that new toolbar actions added to incognito toolbars become visible (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | chrome/browser/ui/toolbar/toolbar_actions_model_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 25cc67103e1a4dae1a07e2308ee3c59d608501d1..0f9a51bf4ebed0b832a53d7791ad7b0a5494ab7b 100644
--- a/chrome/browser/ui/toolbar/toolbar_actions_model.cc
+++ b/chrome/browser/ui/toolbar/toolbar_actions_model.cc
@@ -388,7 +388,8 @@ void ToolbarActionsModel::AddItem(const ToolbarItem& item) {
// nondeterministic, we can't just assume the main bar will have the
// extension and look it up.
size_t main_index = main_model->FindNewPositionFromLastKnownGood(item);
- bool visible = main_index < main_model->visible_icon_count();
+ bool visible =
+ is_new_extension || main_index < main_model->visible_icon_count();
// We may need to adjust the visible count if the incognito bar isn't
// showing all icons and this one is visible, or if it is showing all
// icons and this is hidden.
« no previous file with comments | « no previous file | chrome/browser/ui/toolbar/toolbar_actions_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698