summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/webui
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/webui')
-rw-r--r--chrome/browser/ui/webui/flags_ui.cc12
-rw-r--r--chrome/browser/ui/webui/options/language_options_handler.cc6
2 files changed, 2 insertions, 16 deletions
diff --git a/chrome/browser/ui/webui/flags_ui.cc b/chrome/browser/ui/webui/flags_ui.cc
index a6f8376..07c0c1f 100644
--- a/chrome/browser/ui/webui/flags_ui.cc
+++ b/chrome/browser/ui/webui/flags_ui.cc
@@ -179,17 +179,7 @@ void FlagsDOMHandler::HandleEnableFlagsExperimentMessage(
}
void FlagsDOMHandler::HandleRestartBrowser(const ListValue* args) {
-#if !defined(OS_CHROMEOS)
- // Set the flag to restore state after the restart.
- PrefService* pref_service = g_browser_process->local_state();
- pref_service->SetBoolean(prefs::kRestartLastSessionOnShutdown, true);
- BrowserList::CloseAllBrowsersAndExit();
-#else
- // For CrOS instead of browser restart (which is not supported) perform a full
- // sign out. Session will be only restored is user has that setting set.
- // Same session restore behavior happens in case of full restart after update.
- BrowserList::GetLastActive()->Exit();
-#endif
+ BrowserList::AttemptRestart();
}
} // namespace
diff --git a/chrome/browser/ui/webui/options/language_options_handler.cc b/chrome/browser/ui/webui/options/language_options_handler.cc
index 31f188b..684d78b 100644
--- a/chrome/browser/ui/webui/options/language_options_handler.cc
+++ b/chrome/browser/ui/webui/options/language_options_handler.cc
@@ -110,9 +110,5 @@ void LanguageOptionsHandler::SetApplicationLocale(
void LanguageOptionsHandler::RestartCallback(const ListValue* args) {
UserMetrics::RecordAction(UserMetricsAction("LanguageOptions_Restart"));
-
- // Set the flag to restore state after the restart.
- PrefService* pref_service = g_browser_process->local_state();
- pref_service->SetBoolean(prefs::kRestartLastSessionOnShutdown, true);
- BrowserList::CloseAllBrowsersAndExit();
+ BrowserList::AttemptRestart();
}