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

Unified Diff: chrome/browser/lifetime/application_lifetime.h

Issue 1778873002: Replace Increment/DecrementKeepAliveCount by ScopedKeepAlives (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@KAObserver
Patch Set: replace the commented dcheck by a dlog 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
Index: chrome/browser/lifetime/application_lifetime.h
diff --git a/chrome/browser/lifetime/application_lifetime.h b/chrome/browser/lifetime/application_lifetime.h
index 4930c67010c75984ded3d91b01e87eab18b20f91..77af41887a48c7d5d5dedb907e75346a0b54f677 100644
--- a/chrome/browser/lifetime/application_lifetime.h
+++ b/chrome/browser/lifetime/application_lifetime.h
@@ -56,26 +56,14 @@ void CloseAllBrowsersAndQuit();
// browser windows keeping it alive or the application is quitting.
void CloseAllBrowsers();
+// If there are no browsers open and we aren't already shutting down,
+// initiate a shutdown. Also skips shutdown if this is a unit test.
+// (MessageLoop::current() == null or explicitly disabled).
+void CloseAllBrowsersIfNeeded();
+
// Begins shutdown of the application when the desktop session is ending.
void SessionEnding();
-// Tells the BrowserList to keep the application alive after the last Browser
-// closes. This is implemented as a count, so callers should pair their calls
-// to IncrementKeepAliveCount() with matching calls to DecrementKeepAliveCount()
-// when they no
-// longer need to keep the application running.
-void IncrementKeepAliveCount();
-
-// Stops keeping the application alive after the last Browser is closed.
-// Should match a previous call to IncrementKeepAliveCount().
-void DecrementKeepAliveCount();
-
-// Returns the current keep alive count.
-int GetKeepAliveCountForTesting();
-
-// Returns true if application will continue running after the last Browser
-// closes.
-bool WillKeepAlive();
#endif // !defined(OS_ANDROID)
// Emits APP_TERMINATING notification. It is guaranteed that the
« no previous file with comments | « chrome/browser/devtools/devtools_sanity_browsertest.cc ('k') | chrome/browser/lifetime/application_lifetime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698