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

Unified Diff: ash/shell/app_list.cc

Issue 148403007: Protect AppListItemList Add/Remove and fix sync bugs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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
Index: ash/shell/app_list.cc
diff --git a/ash/shell/app_list.cc b/ash/shell/app_list.cc
index 72a0777e6cc6428447cb884cf362ff7fce0ebadb..10e1a6146e1f50fa82ef8639422a6bce3ad8e2f7 100644
--- a/ash/shell/app_list.cc
+++ b/ash/shell/app_list.cc
@@ -198,19 +198,19 @@ class ExampleAppListViewDelegate : public app_list::AppListViewDelegate {
public:
ExampleAppListViewDelegate()
: model_(new app_list::AppListModel) {
- PopulateApps(model_->item_list());
+ PopulateApps();
DecorateSearchBox(model_->search_box());
}
private:
- void PopulateApps(app_list::AppListItemList* item_list) {
+ void PopulateApps() {
for (int i = 0;
i < static_cast<int>(WindowTypeLauncherItem::LAST_TYPE);
++i) {
WindowTypeLauncherItem::Type type =
static_cast<WindowTypeLauncherItem::Type>(i);
std::string id = base::StringPrintf("%d", i);
- item_list->AddItem(new WindowTypeLauncherItem(id, type));
+ model_->AddItem(new WindowTypeLauncherItem(id, type));
}
}

Powered by Google App Engine
This is Rietveld 408576698