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

Unified Diff: ui/app_list/cocoa/apps_search_box_controller.mm

Issue 25535006: Fix rebuilding the profile selector on the OSX App Launcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add setModel:NULL - destroying the C++ object is guaranteed, but not the menuController_ Created 7 years, 3 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
« no previous file with comments | « ui/app_list/app_list_menu.cc ('k') | ui/app_list/cocoa/apps_search_box_controller_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/cocoa/apps_search_box_controller.mm
diff --git a/ui/app_list/cocoa/apps_search_box_controller.mm b/ui/app_list/cocoa/apps_search_box_controller.mm
index 2c806324f8c1eabd28cb5f18256df6832f4ec61a..2fa9928b207a42b33a59b5196048d747c33be791 100644
--- a/ui/app_list/cocoa/apps_search_box_controller.mm
+++ b/ui/app_list/cocoa/apps_search_box_controller.mm
@@ -159,6 +159,10 @@ void SearchBoxModelObserverBridge::TextChanged() {
if (![delegate_ appListDelegate])
return;
+ [menuController_ setModel:NULL];
+ appListMenu_.reset(
+ new app_list::AppListMenu([delegate_ appListDelegate],
+ [delegate_ appListModel]->users()));
menuController_.reset([[AppListMenuController alloc]
initWithSearchBoxController:self]);
[menuButton_ setMenu:[menuController_ menu]]; // Menu will populate here.
@@ -174,12 +178,6 @@ void SearchBoxModelObserverBridge::TextChanged() {
return;
bridge_.reset(new app_list::SearchBoxModelObserverBridge(self));
- if (![delegate_ appListDelegate])
- return;
-
- appListMenu_.reset(
- new app_list::AppListMenu([delegate_ appListDelegate],
- [delegate_ appListModel]->users()));
[self rebuildMenu];
}
« no previous file with comments | « ui/app_list/app_list_menu.cc ('k') | ui/app_list/cocoa/apps_search_box_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698