| 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..6fae2bbdfe2d067ac4f399fd0afee69b0ea0c192 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,27 @@
|
| #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) {}
|
|
|
| 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();
|
|
|