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

Unified Diff: chrome/browser/browser_shutdown.cc

Issue 1931503002: Add BackgroundModeOptimizer that can restart the browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PushKeepAlive
Patch Set: cleanup, enable by default (that's just to verify the tests) 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.cc
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc
index ab8f9d7561797948661f840a633e867733a84666..73f77b2c95e5a26afa5d929ee0fedefade1e86b2 100644
--- a/chrome/browser/browser_shutdown.cc
+++ b/chrome/browser/browser_shutdown.cc
@@ -194,7 +194,8 @@ bool ShutdownPreThreadsStop() {
return restart_last_session;
}
-void ShutdownPostThreadsStop(bool restart_last_session) {
+void ShutdownPostThreadsStop(bool restart_last_session,
+ bool restart_in_background) {
delete g_browser_process;
g_browser_process = NULL;
@@ -239,6 +240,8 @@ void ShutdownPostThreadsStop(bool restart_last_session) {
else
new_cl->AppendSwitch(it.first);
}
+ if (restart_in_background)
+ new_cl->AppendSwitch(switches::kNoStartupWindow);
#if defined(OS_POSIX) || defined(OS_WIN)
upgrade_util::RelaunchChromeBrowser(*new_cl.get());

Powered by Google App Engine
This is Rietveld 408576698