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

Unified Diff: chrome/browser/ui/app_list/app_list_shower_views.cc

Issue 492163002: Fix Profile* lifetime issues in Chrome's AppListViewDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update unit test, cl format Created 6 years, 4 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: chrome/browser/ui/app_list/app_list_shower_views.cc
diff --git a/chrome/browser/ui/app_list/app_list_shower_views.cc b/chrome/browser/ui/app_list/app_list_shower_views.cc
index 33dfa30e3be8ee7dd36fd9bbe690d039157bdc22..a7a02395fafaa07e35fb05321b37c96a09e36fdc 100644
--- a/chrome/browser/ui/app_list/app_list_shower_views.cc
+++ b/chrome/browser/ui/app_list/app_list_shower_views.cc
@@ -101,8 +101,9 @@ bool AppListShower::HasView() const {
app_list::AppListView* AppListShower::MakeViewForCurrentProfile() {
// The view delegate will be owned by the app list view. The app list view
// manages its own lifetime.
- AppListViewDelegate* view_delegate = new AppListViewDelegate(
- profile_, delegate_->GetControllerDelegateForCreate());
+ AppListViewDelegate* view_delegate =
+ new AppListViewDelegate(delegate_->GetControllerDelegateForCreate());
+ view_delegate->SetProfile(profile_);
app_list::AppListView* view = new app_list::AppListView(view_delegate);
gfx::Point cursor = gfx::Screen::GetNativeScreen()->GetCursorScreenPoint();
view->InitAsBubbleAtFixedLocation(NULL,

Powered by Google App Engine
This is Rietveld 408576698