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

Unified Diff: chrome/browser/extensions/extension_toolbar_model.cc

Issue 981603002: [Extensions Toolbar] Component extensions default to the front of the toolbar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_toolbar_model_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_toolbar_model.cc
diff --git a/chrome/browser/extensions/extension_toolbar_model.cc b/chrome/browser/extensions/extension_toolbar_model.cc
index e5a05cb17437b52e0e08151799467d5e9866e602..c7062e82501029f3c0ca3181ca1d0433f644bf96 100644
--- a/chrome/browser/extensions/extension_toolbar_model.cc
+++ b/chrome/browser/extensions/extension_toolbar_model.cc
@@ -318,7 +318,8 @@ void ExtensionToolbarModel::AddExtension(const Extension* extension) {
// extensions go at their previous position.
size_t new_index = 0;
if (is_new_extension) {
- new_index = visible_icon_count();
+ new_index = Manifest::IsComponentLocation(extension->location()) ?
+ 0 : visible_icon_count();
// For the last-known position, we use the index of the extension that is
// just before this extension, plus one. (Note that this isn't the same
// as new_index + 1, because last_known_positions_ can include disabled
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_toolbar_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698