Index: chrome/browser/chrome_browser_main.cc |
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc |
index 54df3f5641ce39e4442445d9eab7d90651824854..887c629b7b68bfb8583a89f0114c33cffb427560 100644 |
--- a/chrome/browser/chrome_browser_main.cc |
+++ b/chrome/browser/chrome_browser_main.cc |
@@ -232,6 +232,10 @@ |
#include "components/nacl/browser/nacl_process_host.h" |
#endif // !defined(DISABLE_NACL) |
+#if BUILDFLAG(ENABLE_BACKGROUND) |
+#include "chrome/browser/background/background_mode_manager.h" |
+#endif // BUILDFLAG(ENABLE_BACKGROUND) |
+ |
#if defined(ENABLE_EXTENSIONS) |
#include "chrome/browser/extensions/startup_helper.h" |
#include "extensions/browser/extension_protocols.h" |
@@ -2014,11 +2018,19 @@ void ChromeBrowserMainParts::PostDestroyThreads() { |
// not finish. |
NOTREACHED(); |
#else |
+ |
+ bool restart_in_background = false; |
+ |
+#if BUILDFLAG(ENABLE_BACKGROUND) |
+ restart_in_background = BackgroundModeManager::ShouldRestartInBackground(); |
sky
2016/07/06 16:55:33
Doesn't this only matter if restart_last_session_?
dgn
2016/07/22 15:18:09
Yes, made that explicit here.
|
+#endif // BUILDFLAG(ENABLE_BACKGROUND) |
+ |
browser_process_->PostDestroyThreads(); |
// browser_shutdown takes care of deleting browser_process, so we need to |
// release it. |
ignore_result(browser_process_.release()); |
- browser_shutdown::ShutdownPostThreadsStop(restart_last_session_); |
+ browser_shutdown::ShutdownPostThreadsStop(restart_last_session_, |
+ restart_in_background); |
master_prefs_.reset(); |
process_singleton_.reset(); |
device_event_log::Shutdown(); |