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

Unified Diff: chrome/browser/ui/app_list/app_list_service_mac.mm

Issue 492163002: Fix Profile* lifetime issues in Chrome's AppListViewDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add constructor comment 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_service_mac.mm
diff --git a/chrome/browser/ui/app_list/app_list_service_mac.mm b/chrome/browser/ui/app_list/app_list_service_mac.mm
index 8e448e8cde0a1c4c728ce16299c30b7bcee3fd59..c7a97570932d39e3a43758b4aeccc43e041a87e8 100644
--- a/chrome/browser/ui/app_list/app_list_service_mac.mm
+++ b/chrome/browser/ui/app_list/app_list_service_mac.mm
@@ -452,6 +452,17 @@ void AppListServiceMac::CreateShortcut() {
g_browser_process->profile_manager()->user_data_dir()));
}
+void AppListServiceMac::DestroyAppList() {
+ // Due to reference counting, Mac can't guarantee that the widget is deleted,
+ // but mac supports a visible app list with a NULL profile, so there's also no
+ // need to tear it down completely.
+ DismissAppList();
+ [[window_controller_ appListViewController]
+ setDelegate:scoped_ptr<app_list::AppListViewDelegate>()];
+
+ profile_ = NULL;
+}
+
NSWindow* AppListServiceMac::GetAppListWindow() {
return [window_controller_ window];
}
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_mac.h ('k') | chrome/browser/ui/app_list/app_list_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698