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

Unified Diff: chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc

Issue 2870683002: ash: Remove ShelfModel id conversion functions. (Closed)
Patch Set: Address comments. Created 3 years, 7 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
Index: chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
index a933c3c773542b92969406c9f33f662a11daa743..ff45c10dd6aa78685a65722f1bc071948f38bf01 100644
--- a/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
@@ -358,21 +358,16 @@ bool BrowserShortcutLauncherItemController::IsBrowserRepresentedInBrowserList(
if (!browser || !IsBrowserFromActiveUser(browser))
return false;
- // v1 App popup windows with a valid app id have their own icon.
- if (browser->is_app() && browser->is_type_popup() &&
- !shelf_model_
- ->GetShelfIDForAppID(
- web_app::GetExtensionIdFromApplicationName(browser->app_name()))
- .IsNull()) {
- return false;
+ // V1 App popup windows may have their own item.
+ if (browser->is_app() && browser->is_type_popup()) {
+ ash::ShelfID id(
+ web_app::GetExtensionIdFromApplicationName(browser->app_name()));
+ if (ChromeLauncherController::instance()->GetItem(id) != nullptr)
+ return false;
}
- // Settings browsers have their own icon.
- if (IsSettingsBrowser(browser))
- return false;
-
- // Tabbed browser and other popup windows are all represented.
- return true;
+ // Settings browsers have their own item; all others should be represented.
+ return !IsSettingsBrowser(browser);
}
BrowserList::BrowserVector

Powered by Google App Engine
This is Rietveld 408576698