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

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

Issue 2627533002: Replace ShelfItemDelegate::GetTitle() with ShelfItem::title. (Closed)
Patch Set: Address comments. Created 3 years, 11 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 | « ash/common/shelf/shelf_model.cc ('k') | ash/common/shelf/shelf_window_watcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/shelf_view.cc
diff --git a/ash/common/shelf/shelf_view.cc b/ash/common/shelf/shelf_view.cc
index 5a6bfaa6263e7e25ce84b25744ba31734f18d7d1..48458db58ec18c3b5c6ae0b433e18c0a906dce2f 100644
--- a/ash/common/shelf/shelf_view.cc
+++ b/ash/common/shelf/shelf_view.cc
@@ -527,9 +527,7 @@ bool ShelfView::ShouldShowTooltipForView(const views::View* view) const {
base::string16 ShelfView::GetTitleForView(const views::View* view) const {
const ShelfItem* item = ShelfItemForView(view);
- if (!item || !model_->GetShelfItemDelegate(item->id))
- return base::string16();
- return model_->GetShelfItemDelegate(item->id)->GetTitle();
+ return item ? item->title : base::string16();
}
gfx::Rect ShelfView::GetVisibleItemsBoundsInScreen() {
« no previous file with comments | « ash/common/shelf/shelf_model.cc ('k') | ash/common/shelf/shelf_window_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698