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

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

Issue 1708343002: Add ScopedKeepAlive to c/b/lifetime (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address PS7 comments, replace strings by a struct ptr, chromeappdelegate ctor takes a boolean Created 4 years, 10 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_views.cc
diff --git a/chrome/browser/ui/app_list/app_list_service_views.cc b/chrome/browser/ui/app_list/app_list_service_views.cc
index 8ae98e5e8010d4f451a95b732ffdad555759f65e..53a5d3f1c6fc2836837c46de4acec48b236f2c22 100644
--- a/chrome/browser/ui/app_list/app_list_service_views.cc
+++ b/chrome/browser/ui/app_list/app_list_service_views.cc
@@ -6,13 +6,20 @@
#include <utility>
-#include "chrome/browser/apps/scoped_keep_alive.h"
+#include "chrome/browser/lifetime/keep_alive_options.h"
+#include "chrome/browser/lifetime/scoped_keep_alive.h"
#include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
#include "ui/app_list/app_list_switches.h"
#include "ui/app_list/views/app_list_main_view.h"
#include "ui/app_list/views/app_list_view.h"
#include "ui/app_list/views/contents_view.h"
+namespace {
+
+static const KeepAliveOptions g_keep_alive_options = {"AppListServiceViews"};
Bernhard Bauer 2016/02/22 18:19:38 Same as above. Also (as mentioned above), the anon
dgn 2016/02/22 19:07:19 Thanks. Removed since there's nothing else in the
+
+} // namespace
+
AppListServiceViews::AppListServiceViews(
scoped_ptr<AppListControllerDelegate> controller_delegate)
: shower_(this),
@@ -116,7 +123,7 @@ void AppListServiceViews::ShowForProfileInternal(
app_list::AppListModel::State state) {
DCHECK(profile);
- ScopedKeepAlive keep_alive;
+ ScopedKeepAlive keep_alive(&g_keep_alive_options);
CreateForProfile(profile);

Powered by Google App Engine
This is Rietveld 408576698