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

Unified Diff: ash/common/shelf/shelf_model.cc

Issue 2518423003: Combine shelf platform and windowed app types. (Closed)
Patch Set: Fix kInvalidShelfID typo. 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
« no previous file with comments | « ash/common/shelf/shelf_item_types.h ('k') | ash/common/shelf/shelf_model_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/shelf_model.cc
diff --git a/ash/common/shelf/shelf_model.cc b/ash/common/shelf/shelf_model.cc
index 13e0b922a41427e25125abc9adb8f6d9e30ae7b4..5d7e7245247bcafd1d553e19766ff94198970903 100644
--- a/ash/common/shelf/shelf_model.cc
+++ b/ash/common/shelf/shelf_model.cc
@@ -22,8 +22,7 @@ int ShelfItemTypeToWeight(ShelfItemType type) {
case TYPE_BROWSER_SHORTCUT:
case TYPE_APP_SHORTCUT:
return 1;
- case TYPE_WINDOWED_APP:
- case TYPE_PLATFORM_APP:
+ case TYPE_APP:
return 2;
case TYPE_DIALOG:
return 3;
@@ -141,12 +140,8 @@ ShelfItems::const_iterator ShelfModel::ItemByID(int id) const {
}
int ShelfModel::FirstRunningAppIndex() const {
- // Since lower_bound only checks weights against each other, we do not need
- // to explicitly change different running application types.
- DCHECK_EQ(ShelfItemTypeToWeight(TYPE_WINDOWED_APP),
- ShelfItemTypeToWeight(TYPE_PLATFORM_APP));
ShelfItem weight_dummy;
- weight_dummy.type = TYPE_WINDOWED_APP;
+ weight_dummy.type = TYPE_APP;
return std::lower_bound(items_.begin(), items_.end(), weight_dummy,
CompareByWeight) -
items_.begin();
« no previous file with comments | « ash/common/shelf/shelf_item_types.h ('k') | ash/common/shelf/shelf_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698