Chromium Code Reviews| Index: chrome/browser/ui/app_list/app_list_view_delegate.cc |
| diff --git a/chrome/browser/ui/app_list/app_list_view_delegate.cc b/chrome/browser/ui/app_list/app_list_view_delegate.cc |
| index 95ed009f4656ceaeef33174a24d15f44c0054897..ac5fe4a0cbc4de6ececd04a950bbc588a77a73ff 100644 |
| --- a/chrome/browser/ui/app_list/app_list_view_delegate.cc |
| +++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc |
| @@ -15,25 +15,26 @@ |
| #include "chrome/browser/ui/ash/app_list/app_sync_ui_state_watcher.h" |
| #endif |
| -AppListViewDelegate::AppListViewDelegate(AppListControllerDelegate* controller) |
| - : controller_(controller) {} |
| +AppListViewDelegate::AppListViewDelegate(AppListControllerDelegate* controller, |
| + Profile* profile) |
| + : controller_(controller), profile_(profile) {} |
|
xiyuan
2013/01/23 00:09:33
nit: one member per line
koz (OOO until 15th September)
2013/01/23 00:16:43
Done.
|
| AppListViewDelegate::~AppListViewDelegate() {} |
| void AppListViewDelegate::SetModel(app_list::AppListModel* model) { |
| if (model) { |
| - Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); |
| - apps_builder_.reset(new AppsModelBuilder(profile, |
| + apps_builder_.reset(new AppsModelBuilder(profile_, |
| model->apps(), |
| controller_.get())); |
| apps_builder_->Build(); |
| - search_builder_.reset(new SearchBuilder(profile, |
| + search_builder_.reset(new SearchBuilder(profile_, |
| model->search_box(), |
| model->results(), |
| controller_.get())); |
| #if defined(USE_ASH) |
| - app_sync_ui_state_watcher_.reset(new AppSyncUIStateWatcher(profile, model)); |
| + app_sync_ui_state_watcher_.reset(new AppSyncUIStateWatcher(profile_, |
| + model)); |
| #endif |
| } else { |
| apps_builder_.reset(); |