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

Issue 6462024: Register Application Restart with Windows Restart Manager (Closed)

Created:
9 years, 10 months ago by msw
Modified:
9 years, 7 months ago
CC:
chromium-reviews, brettw-cc_chromium.org
Visibility:
Public.

Description

Register Application Restart with Windows Restart Manager on browser_main startup for Windows Vista / Server 2008 and beyond. This launches Chrome and restores tabs if the computer is restarted as the result of an update. Use GetFunctionPointer/GetProcAddress to avoid XP link and run errors. Make changes to support necessary CommandLine operations. Other minor cleanup and refactoring. BUG=70824 TEST=Reboot from update or ::ExitWindowsEx(EWX_RESTARTAPPS... Chrome should restart and restore tabs on login. Test launching Chrome with a variety of command-line switches and arguments. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=75405 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=75516

Patch Set 1 #

Patch Set 2 : "Fix comments, Append CommandLine args." #

Patch Set 3 : "Update comment." #

Total comments: 8

Patch Set 4 : Update comments. #

Total comments: 16

Patch Set 5 : Address feedback, limit to Vista+, add switch warning. #

Patch Set 6 : Address feedback, limit to Vista+, add switch warning. #

Patch Set 7 : Sync #

Total comments: 3

Patch Set 8 : Use GetFunctionPointer to avoid XP link and run errors. #

Total comments: 8

Patch Set 9 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+137 lines, -65 lines) Patch
M base/command_line.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M base/command_line.cc View 1 2 3 4 6 chunks +75 lines, -56 lines 0 comments Download
M chrome/browser/browser_main.cc View 1 2 3 4 5 6 7 4 chunks +15 lines, -4 lines 0 comments Download
M chrome/browser/browser_main_win.h View 1 2 3 4 2 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/browser_main_win.cc View 1 2 3 4 5 6 7 8 4 chunks +37 lines, -2 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
msw
Evan, please review the CommandLine changes. My questions/considerations: - Should we avoid registering incognito, tests, ...
9 years, 10 months ago (2011-02-09 23:33:15 UTC) #1
Ben Goodger (Google)
http://codereview.chromium.org/6462024/diff/6002/chrome/browser/browser_main.cc File chrome/browser/browser_main.cc (right): http://codereview.chromium.org/6462024/diff/6002/chrome/browser/browser_main.cc#newcode1521 chrome/browser/browser_main.cc:1521: RegisterApplicationRestart(parsed_command_line); You might add a quick note here saying ...
9 years, 10 months ago (2011-02-10 16:56:49 UTC) #2
msw
Done. Ping: cpu & evan. http://codereview.chromium.org/6462024/diff/6002/chrome/browser/browser_main.cc File chrome/browser/browser_main.cc (right): http://codereview.chromium.org/6462024/diff/6002/chrome/browser/browser_main.cc#newcode1521 chrome/browser/browser_main.cc:1521: RegisterApplicationRestart(parsed_command_line); On 2011/02/10 16:56:49, ...
9 years, 10 months ago (2011-02-10 18:35:06 UTC) #3
cpu_(ooo_6.6-7.5)
My main concern is how this interacts with the restart-on-crash code that we already have ...
9 years, 10 months ago (2011-02-10 18:59:24 UTC) #4
Evan Martin
http://codereview.chromium.org/6462024/diff/10001/base/command_line.cc File base/command_line.cc (right): http://codereview.chromium.org/6462024/diff/10001/base/command_line.cc#newcode44 base/command_line.cc:44: namespace { Thanks for the cleanup! Can you remove ...
9 years, 10 months ago (2011-02-10 19:38:31 UTC) #5
msw
Done most; I propose to fix and cleanup CommandLine code in a new prerequisite blocking ...
9 years, 10 months ago (2011-02-10 19:54:54 UTC) #6
msw
Please review and see new tangentially related Issue 73195. Elliot, please review CommandLine (EvanM is ...
9 years, 10 months ago (2011-02-16 23:15:53 UTC) #7
Elliot Glaysher
LGTM assuming you cleanup 73195 later. On 2011/02/16 23:15:53, msw wrote: > Please review and ...
9 years, 10 months ago (2011-02-16 23:21:25 UTC) #8
msw
On 2011/02/16 23:21:25, Elliot Glaysher wrote: > LGTM assuming you cleanup 73195 later. > > ...
9 years, 10 months ago (2011-02-17 01:25:52 UTC) #9
msw
On 2011/02/17 01:25:52, msw wrote: > On 2011/02/16 23:21:25, Elliot Glaysher wrote: > > LGTM ...
9 years, 10 months ago (2011-02-17 01:29:03 UTC) #10
msw
Okay, tests are green after a sync. Ben, Carlos: Do I have LGTM from you?
9 years, 10 months ago (2011-02-17 04:06:15 UTC) #11
Ben Goodger (Google)
http://codereview.chromium.org/6462024/diff/21010/chrome/browser/browser_main_win.cc File chrome/browser/browser_main_win.cc (right): http://codereview.chromium.org/6462024/diff/21010/chrome/browser/browser_main_win.cc#newcode161 chrome/browser/browser_main_win.cc:161: HRESULT hr = ::RegisterApplicationRestart(command_string, One question: does this result ...
9 years, 10 months ago (2011-02-17 04:12:29 UTC) #12
Finnur
http://codereview.chromium.org/6462024/diff/21010/chrome/browser/browser_main_win.cc File chrome/browser/browser_main_win.cc (right): http://codereview.chromium.org/6462024/diff/21010/chrome/browser/browser_main_win.cc#newcode161 chrome/browser/browser_main_win.cc:161: HRESULT hr = ::RegisterApplicationRestart(command_string, FileMon shows no File/Registry access ...
9 years, 10 months ago (2011-02-17 10:30:54 UTC) #13
Finnur
Sorry, ProcessMon is what I meant. On 2011/02/17 10:30:54, Finnur wrote: > http://codereview.chromium.org/6462024/diff/21010/chrome/browser/browser_main_win.cc > File ...
9 years, 10 months ago (2011-02-17 10:31:13 UTC) #14
msw
I agree with Finnur; see my comment below. http://codereview.chromium.org/6462024/diff/21010/chrome/browser/browser_main_win.cc File chrome/browser/browser_main_win.cc (right): http://codereview.chromium.org/6462024/diff/21010/chrome/browser/browser_main_win.cc#newcode161 chrome/browser/browser_main_win.cc:161: HRESULT ...
9 years, 10 months ago (2011-02-17 12:18:29 UTC) #15
msw
Did Finnur and I address your blocking I/O question satisfactorily? Is there a better way ...
9 years, 10 months ago (2011-02-18 16:56:28 UTC) #16
Ben Goodger (Google)
Oh yes. LGTM. On Fri, Feb 18, 2011 at 8:56 AM, <msw@chromium.org> wrote: > Did ...
9 years, 10 months ago (2011-02-18 16:58:48 UTC) #17
msw
Sorry for the churn; please review. Use GetFunctionPointer/GetProcAddress to avoid XP link and run errors. ...
9 years, 10 months ago (2011-02-18 23:03:22 UTC) #18
Ben Goodger (Google)
OK http://codereview.chromium.org/6462024/diff/3008/chrome/browser/browser_main_win.cc File chrome/browser/browser_main_win.cc (right): http://codereview.chromium.org/6462024/diff/3008/chrome/browser/browser_main_win.cc#newcode45 chrome/browser/browser_main_win.cc:45: typedef DECLSPEC_IMPORT HRESULT (STDAPICALLTYPE *RAR)( STDAPICALLTYPE* http://codereview.chromium.org/6462024/diff/3008/chrome/browser/browser_main_win.cc#newcode46 chrome/browser/browser_main_win.cc:46: ...
9 years, 10 months ago (2011-02-18 23:41:50 UTC) #19
msw
9 years, 10 months ago (2011-02-18 23:57:36 UTC) #20
Done. FYI, PerfTimer still shows 0ms, and there's no new registry access via
this change.

http://codereview.chromium.org/6462024/diff/3008/chrome/browser/browser_main_...
File chrome/browser/browser_main_win.cc (right):

http://codereview.chromium.org/6462024/diff/3008/chrome/browser/browser_main_...
chrome/browser/browser_main_win.cc:45: typedef DECLSPEC_IMPORT HRESULT
(STDAPICALLTYPE *RAR)(
On 2011/02/18 23:41:51, Ben Goodger wrote:
> STDAPICALLTYPE*

Done.

http://codereview.chromium.org/6462024/diff/3008/chrome/browser/browser_main_...
chrome/browser/browser_main_win.cc:46: const wchar_t *pwzCommandline,
On 2011/02/18 23:41:51, Ben Goodger wrote:
> we don't use hungarian...
> 
> const wchar_t* command_line
> 
> instead.

Done.

http://codereview.chromium.org/6462024/diff/3008/chrome/browser/browser_main_...
chrome/browser/browser_main_win.cc:47: DWORD dwFlags);
On 2011/02/18 23:41:51, Ben Goodger wrote:
> flags

Done.

http://codereview.chromium.org/6462024/diff/3008/chrome/browser/browser_main_...
chrome/browser/browser_main_win.cc:162:
library.GetFunctionPointer("RegisterApplicationRestart"));
On 2011/02/18 23:41:51, Ben Goodger wrote:
> 4-space indent

Done.

Powered by Google App Engine
This is Rietveld 408576698