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

Unified Diff: chrome/browser/lifetime/application_lifetime.cc

Issue 2493973003: Display "Restart to update" dialog to Chrome OS users. (Closed)
Patch Set: Display "Restart to update" dialog to Chrome OS users. Created 4 years 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/lifetime/application_lifetime.cc
diff --git a/chrome/browser/lifetime/application_lifetime.cc b/chrome/browser/lifetime/application_lifetime.cc
index 31d58fb369ec90137d80baa7c41277f85beb7a2d..090f881dc0c26afee4240cdd321c5e74ac347a87 100644
--- a/chrome/browser/lifetime/application_lifetime.cc
+++ b/chrome/browser/lifetime/application_lifetime.cc
@@ -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.
@@ -376,15 +376,17 @@ 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();
+ 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 {

Powered by Google App Engine
This is Rietveld 408576698