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

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..4e36cfca01b7f26ce826868624683e2894724bd0 100644
--- a/chrome/browser/lifetime/application_lifetime.cc
+++ b/chrome/browser/lifetime/application_lifetime.cc
@@ -358,6 +358,10 @@ void NotifyAppTerminating() {
}
void NotifyAndTerminate(bool fast_path) {
+ NotifyAndTerminate(fast_path, ApplicationLifetime::kOptionalReboot);
+}
+
+void NotifyAndTerminate(bool fast_path, ApplicationLifetime lifetime) {
#if defined(OS_CHROMEOS)
static bool notified = false;
// Return if a shutdown request has already been sent.
@@ -376,15 +380,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 ||
+ lifetime == ApplicationLifetime::kForceReboot) {
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