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

Unified Diff: chrome/browser/browser_shutdown.h

Issue 1931503002: Add BackgroundModeOptimizer that can restart the browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PushKeepAlive
Patch Set: fix BrowserListTest.AttemptRestart Created 4 years, 5 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/browser_shutdown.h
diff --git a/chrome/browser/browser_shutdown.h b/chrome/browser/browser_shutdown.h
index c3450329d821fe916384dc5a6e38d406e7dfe58e..e3cf6506841d13a1bcdb9817be6c1a14c77dda57 100644
--- a/chrome/browser/browser_shutdown.h
+++ b/chrome/browser/browser_shutdown.h
@@ -11,6 +11,20 @@ class PrefRegistrySimple;
namespace browser_shutdown {
+// Shutdown flags
+enum Flags {
+ NO_FLAGS = 0,
+
+ // If |RESTART_LAST_SESSION| is set, the browser will attempt to restart in
+ // in the last session after the shutdown.
+ RESTART_LAST_SESSION = 1 << 0,
+
+ // Makes a panned restart happen in the background. The browser will just come
+ // up in the system tray but not open a new window after restarting. This flag
+ // has no effect if |RESTART_LAST_SESSION| is not set.
+ RESTART_IN_BACKGROUND = 1 << 1
+};
+
enum ShutdownType {
// an uninitialized value
NOT_VALID = 0,
@@ -41,9 +55,8 @@ bool ShutdownPreThreadsStop();
// Performs the remaining shutdown tasks after all threads but the
// main thread have been stopped. This includes deleting g_browser_process.
//
-// The provided parameter indicates whether a preference to restart
-// the session was present.
-void ShutdownPostThreadsStop(bool restart_last_session);
+// See |browser_shutdown::Flags| for the possible flag values and their effects.
+void ShutdownPostThreadsStop(int shutdown_flags);
#endif
// Called at startup to create a histogram from our previous shutdown time.

Powered by Google App Engine
This is Rietveld 408576698