Index: ash/test/test_shell_delegate.cc |
diff --git a/ash/test/test_shell_delegate.cc b/ash/test/test_shell_delegate.cc |
index 982cae47873e1705228507fb9d9d9dc3982e186b..1d951888adc3958d3dccf947a01b1b71dc38a044 100644 |
--- a/ash/test/test_shell_delegate.cc |
+++ b/ash/test/test_shell_delegate.cc |
@@ -143,8 +143,10 @@ content::BrowserContext* TestShellDelegate::GetActiveBrowserContext() { |
return active_browser_context_.get(); |
} |
-app_list::AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() { |
- return new app_list::test::AppListTestViewDelegate; |
+app_list::AppListViewDelegate* TestShellDelegate::GetAppListViewDelegate() { |
+ if (!app_list_view_delegate_) |
+ app_list_view_delegate_.reset(new app_list::test::AppListTestViewDelegate); |
+ return app_list_view_delegate_.get(); |
} |
ShelfDelegate* TestShellDelegate::CreateShelfDelegate(ShelfModel* model) { |