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

Unified Diff: chrome/browser/browser_main.cc

Issue 6462024: Register Application Restart with Windows Restart Manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comments. Created 9 years, 10 months 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/browser_main.cc
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 73d25ced39b3524ef1d6581bf545f6c0382dbe2c..fb2da284463959306197a541e9b9e0f8c308d49f 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -1519,6 +1519,15 @@ int BrowserMain(const MainFunctionParams& parameters) {
// testing against a bunch of special cases that are taken care early on.
PrepareRestartOnCrashEnviroment(parsed_command_line);
+#if defined(OS_WIN)
+ // Registers Chrome with the Windows Restart Manager, which will restore the
+ // Chrome session when the computer is restarted after a system update.
+ // This could be run as late as WM_QUERYENDSESSION for system update reboots,
+ // but should run on startup if extended to handle crashes/hangs/patches.
cpu_(ooo_6.6-7.5) 2011/02/10 18:59:24 we already handle this restart on crashes see Dump
msw 2011/02/10 19:54:54 Yup, I'm aware but thought it's worth considering
+ // Also, better to run once here than once for each HWND's WM_QUERYENDSESSION.
+ RegisterApplicationRestart(parsed_command_line);
+#endif // OS_WIN
+
// Initialize and maintain network predictor module, which handles DNS
// pre-resolution, as well as TCP/IP connection pre-warming.
// This also registers an observer to discard data when closing incognito
@@ -1541,8 +1550,8 @@ int BrowserMain(const MainFunctionParams& parameters) {
// file thread to be run sometime later. If this is the first run we record
// the installation event.
RLZTracker::InitRlzDelayed(is_first_run, master_prefs.ping_delay);
-#endif
-#endif
+#endif // GOOGLE_CHROME_BUILD
+#endif // OS_WIN
// Configure modules that need access to resources.
net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider);
@@ -1722,7 +1731,7 @@ int BrowserMain(const MainFunctionParams& parameters) {
parameters.ui_task->Run();
delete parameters.ui_task;
} else {
- // We are in regular browser boot sequence. Open initial stabs and enter
+ // We are in regular browser boot sequence. Open initial tabs and enter
// the main message loop.
if (browser_init.Start(parsed_command_line, FilePath(), profile,
&result_code)) {

Powered by Google App Engine
This is Rietveld 408576698