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

Unified Diff: ash/test/test_shell_delegate.cc

Issue 508813002: Move ownership of the AppListViewDelegate into the AppListService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to master Created 6 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
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) {

Powered by Google App Engine
This is Rietveld 408576698