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

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: 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/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 7977f45e2982debd5cca1573c37388ec144ee862..84bc55f7af9e5ba3a99ef043a34e3f399b9ca2b2 100644
--- a/chrome/browser/ui/apps/chrome_app_delegate.cc
+++ b/chrome/browser/ui/apps/chrome_app_delegate.cc
@@ -174,8 +174,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,
@@ -349,7 +349,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,

Powered by Google App Engine
This is Rietveld 408576698