Index: chrome/browser/lifetime/application_lifetime.cc |
diff --git a/chrome/browser/lifetime/application_lifetime.cc b/chrome/browser/lifetime/application_lifetime.cc |
index d7d2e58089f28c607e51c4a941908729bf25c8d8..b0ebd004e1a1ac8e1345e0881aab12a5613e5b0d 100644 |
--- a/chrome/browser/lifetime/application_lifetime.cc |
+++ b/chrome/browser/lifetime/application_lifetime.cc |
@@ -307,6 +307,14 @@ void SessionEnding() { |
browser_shutdown::OnShutdownStarting(browser_shutdown::END_SESSION); |
+ // In a clean shutdown, browser_shutdown::OnShutdownStarting sets |
+ // g_shutdown_type, and browser_shutdown::ShutdownPreThreadsStop updates the |
+ // pref with the value. However, here the process is going to exit without |
+ // calling ShutdownPreThreadsStop. |
+ // Instead, here we update the pref to record the shutdown info. |
+ g_browser_process->local_state()->SetInteger(prefs::kShutdownType, |
sky
2016/09/09 15:40:56
There is a bunch of other stuff ShutdownPreThreads
hashimoto
2016/09/12 05:10:19
Added a new function RecordShutdownInfoPrefs to br
|
+ browser_shutdown::END_SESSION); |
+ |
content::NotificationService::current()->Notify( |
chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST, |
content::NotificationService::AllSources(), |