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

Unified Diff: chrome/browser/ui/apps/chrome_app_delegate.cc

Issue 1725883002: Add KeepAliveStateObserver, add the Restart option (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@KeepAlive
Patch Set: Address comments Created 4 years, 9 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 | « chrome/browser/ui/app_list/profile_loader.cc ('k') | chrome/browser/ui/views/panels/panel_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/apps/chrome_app_delegate.cc
diff --git a/chrome/browser/ui/apps/chrome_app_delegate.cc b/chrome/browser/ui/apps/chrome_app_delegate.cc
index 419d1be052c78a70969dfa54b2776b8b149b531c..bba4f67158fea3e69e5d14c14341f5ae2dae1b17 100644
--- a/chrome/browser/ui/apps/chrome_app_delegate.cc
+++ b/chrome/browser/ui/apps/chrome_app_delegate.cc
@@ -152,8 +152,8 @@ ChromeAppDelegate::ChromeAppDelegate(bool keep_alive)
new_window_contents_delegate_(new NewWindowContentsDelegate()),
weak_factory_(this) {
if (keep_alive) {
- keep_alive_.reset(
- new ScopedKeepAlive(KeepAliveOrigin::CHROME_APP_DELEGATE));
+ keep_alive_.reset(new ScopedKeepAlive(KeepAliveOrigin::CHROME_APP_DELEGATE,
+ KeepAliveRestartOption::DISABLED));
}
registrar_.Add(this,
chrome::NOTIFICATION_APP_TERMINATING,
@@ -327,7 +327,8 @@ void ChromeAppDelegate::OnHide() {
void ChromeAppDelegate::OnShow() {
has_been_shown_ = true;
is_hidden_ = false;
- keep_alive_.reset(new ScopedKeepAlive(KeepAliveOrigin::CHROME_APP_DELEGATE));
+ keep_alive_.reset(new ScopedKeepAlive(KeepAliveOrigin::CHROME_APP_DELEGATE,
+ KeepAliveRestartOption::DISABLED));
}
void ChromeAppDelegate::Observe(int type,
« no previous file with comments | « chrome/browser/ui/app_list/profile_loader.cc ('k') | chrome/browser/ui/views/panels/panel_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698