Index: chrome/browser/lifetime/application_lifetime.cc |
diff --git a/chrome/browser/lifetime/application_lifetime.cc b/chrome/browser/lifetime/application_lifetime.cc |
index 31d58fb369ec90137d80baa7c41277f85beb7a2d..11017dd59a979777cdcf9a343b95812f11009ccb 100644 |
--- a/chrome/browser/lifetime/application_lifetime.cc |
+++ b/chrome/browser/lifetime/application_lifetime.cc |
@@ -132,7 +132,7 @@ void ShutdownIfNoBrowsers() { |
ProfileManager::ShutdownSessionServices(); |
#endif |
- chrome::NotifyAndTerminate(true); |
+ chrome::NotifyAndTerminate(/*fast_path=*/true,/*always_reboot=*/false); |
James Cook
2016/11/30 23:01:41
ditto, and throughout
Greg K
2016/12/01 19:44:43
Done.
|
chrome::OnAppExiting(); |
} |
@@ -181,7 +181,7 @@ void AttemptUserExit() { |
g_send_stop_request_to_session_manager = true; |
// On ChromeOS, always terminate the browser, regardless of the result of |
// AreAllBrowsersCloseable(). See crbug.com/123107. |
- chrome::NotifyAndTerminate(true); |
+ chrome::NotifyAndTerminate(/*fast_path=*/true,/*always_reboot=*/false); |
#else |
// Reset the restart bit that might have been set in cancelled restart |
// request. |
@@ -357,7 +357,7 @@ void NotifyAppTerminating() { |
content::NotificationService::NoDetails()); |
} |
-void NotifyAndTerminate(bool fast_path) { |
+void NotifyAndTerminate(bool fast_path, bool always_reboot) { |
#if defined(OS_CHROMEOS) |
static bool notified = false; |
// Return if a shutdown request has already been sent. |
@@ -375,16 +375,18 @@ void NotifyAndTerminate(bool fast_path) { |
if (base::SysInfo::IsRunningOnChromeOS()) { |
// If we're on a ChromeOS device, reboot if an update has been applied, |
- // or else signal the session manager to log out. |
- chromeos::UpdateEngineClient* update_engine_client |
- = chromeos::DBusThreadManager::Get()->GetUpdateEngineClient(); |
+ // // or else signal the session manager to log out. |
James Cook
2016/11/30 23:01:41
fix formatting please
Greg K
2016/12/01 19:44:43
Done.
|
+ chromeos::UpdateEngineClient* update_engine_client = |
+ chromeos::DBusThreadManager::Get()->GetUpdateEngineClient(); |
if (update_engine_client->GetLastStatus().status == |
- chromeos::UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT) { |
+ chromeos::UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT || |
+ always_reboot) { |
update_engine_client->RebootAfterUpdate(); |
} else if (g_send_stop_request_to_session_manager) { |
// Don't ask SessionManager to stop session if the shutdown request comes |
// from session manager. |
- chromeos::DBusThreadManager::Get()->GetSessionManagerClient() |
+ chromeos::DBusThreadManager::Get() |
+ ->GetSessionManagerClient() |
->StopSession(); |
} |
} else { |