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

Unified Diff: ui/app_list/app_list_model_view.cc

Issue 10408009: ui: Change ListModel to operate in size_t instead of int. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unittest Created 8 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
« no previous file with comments | « ui/app_list/app_list_model_view.h ('k') | ui/base/models/list_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/app_list_model_view.cc
diff --git a/ui/app_list/app_list_model_view.cc b/ui/app_list/app_list_model_view.cc
index 868a7489496582412faedb1ae914aa8e27737afe..e594277b844edca93e50f438ff0cd338afe908a6 100644
--- a/ui/app_list/app_list_model_view.cc
+++ b/ui/app_list/app_list_model_view.cc
@@ -136,7 +136,7 @@ void AppListModelView::Update() {
if (!model_ || model_->item_count() == 0)
return;
- for (int i = 0; i < model_->item_count(); ++i)
+ for (size_t i = 0; i < model_->item_count(); ++i)
AddChildView(new AppListItemView(this, model_->GetItemAt(i), listener_));
Layout();
@@ -296,8 +296,8 @@ void AppListModelView::OnPaintFocusBorder(gfx::Canvas* canvas) {
// Override to not paint focus frame.
}
-void AppListModelView::ListItemsAdded(int start, int count) {
- for (int i = start; i < start + count; ++i) {
+void AppListModelView::ListItemsAdded(size_t start, size_t count) {
+ for (size_t i = start; i < start + count; ++i) {
AddChildViewAt(new AppListItemView(this, model_->GetItemAt(i), listener_),
i);
}
@@ -305,15 +305,15 @@ void AppListModelView::ListItemsAdded(int start, int count) {
SchedulePaint();
}
-void AppListModelView::ListItemsRemoved(int start, int count) {
- for (int i = 0; i < count; ++i)
+void AppListModelView::ListItemsRemoved(size_t start, size_t count) {
+ for (size_t i = 0; i < count; ++i)
delete child_at(start);
Layout();
SchedulePaint();
}
-void AppListModelView::ListItemsChanged(int start, int count) {
+void AppListModelView::ListItemsChanged(size_t start, size_t count) {
NOTREACHED();
}
« no previous file with comments | « ui/app_list/app_list_model_view.h ('k') | ui/base/models/list_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698