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

Issue 6355011: When changing Ready Mode state from within an IE process, use chrome_launcher... (Closed)

Created:
9 years, 11 months ago by erikwright (departed)
Modified:
9 years, 7 months ago
Reviewers:
amit, robertshield
CC:
chromium-reviews
Visibility:
Public.

Description

When changing Ready Mode state from within an IE process, use chrome_launcher to invoke the ProcessLauncher, so as to not cause a UAC prompt (chrome_launcher is permitted via elevation policy). BUG=None TEST=Install GCF in Ready Mode on Vista, interact with it. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=72361

Patch Set 1 #

Total comments: 6

Patch Set 2 : '' #

Total comments: 13

Patch Set 3 : '' #

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+199 lines, -39 lines) Patch
M chrome_frame/chrome_frame_launcher.gyp View 1 2 chunks +3 lines, -0 lines 0 comments Download
M chrome_frame/chrome_launcher_main.cc View 1 2 1 chunk +8 lines, -4 lines 0 comments Download
M chrome_frame/chrome_launcher_utils.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M chrome_frame/chrome_launcher_utils.cc View 1 2 3 chunks +33 lines, -11 lines 0 comments Download
M chrome_frame/ready_mode/internal/registry_ready_mode_state.cc View 1 3 chunks +29 lines, -24 lines 0 comments Download
A chrome_frame/update_launcher.h View 1 2 3 1 chunk +26 lines, -0 lines 0 comments Download
A chrome_frame/update_launcher.cc View 1 2 1 chunk +94 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
amit
Thanks for wrapping this up in time. Just a few things I noticed but I'll ...
9 years, 11 months ago (2011-01-24 05:54:50 UTC) #1
erikwright (departed)
http://codereview.chromium.org/6355011/diff/1/chrome_frame/ready_mode/internal/registry_ready_mode_state.cc File chrome_frame/ready_mode/internal/registry_ready_mode_state.cc (right): http://codereview.chromium.org/6355011/diff/1/chrome_frame/ready_mode/internal/registry_ready_mode_state.cc#newcode107 chrome_frame/ready_mode/internal/registry_ready_mode_state.cc:107: base::IntegrityLevel integrity_level; On 2011/01/24 05:54:50, amit wrote: > = ...
9 years, 11 months ago (2011-01-24 06:20:59 UTC) #2
robertshield
Looks pretty good, some comments below. Also, please could you upload another patch, I see ...
9 years, 11 months ago (2011-01-24 15:08:42 UTC) #3
erikwright (departed)
Proceeding to a bit of manual testing, but ideally committing around 13h30. http://codereview.chromium.org/6355011/diff/8001/chrome_frame/chrome_launcher_main.cc File chrome_frame/chrome_launcher_main.cc ...
9 years, 11 months ago (2011-01-24 17:17:14 UTC) #4
robertshield
9 years, 11 months ago (2011-01-24 19:13:03 UTC) #5
LGTM

On 2011/01/24 17:17:14, erikwright wrote:
> Proceeding to a bit of manual testing, but ideally committing around 13h30.
> 
>
http://codereview.chromium.org/6355011/diff/8001/chrome_frame/chrome_launcher...
> File chrome_frame/chrome_launcher_main.cc (right):
> 
>
http://codereview.chromium.org/6355011/diff/8001/chrome_frame/chrome_launcher...
> chrome_frame/chrome_launcher_main.cc:20:
> update_launcher::GetUpdateCommandFromArguments(cmd_line);
> On 2011/01/24 15:08:42, robertshield wrote:
> > Nit: prefer constructor syntax:
> > 
> > std::wstring update_command(
> >     update_launcher::GetUpdateCommandFromArguments(cmd_line));
> 
> Done.
> 
>
http://codereview.chromium.org/6355011/diff/8001/chrome_frame/chrome_launcher...
> File chrome_frame/chrome_launcher_utils.cc (right):
> 
>
http://codereview.chromium.org/6355011/diff/8001/chrome_frame/chrome_launcher...
> chrome_frame/chrome_launcher_utils.cc:49: const wchar_t kLauncherExeBaseName[]
=
> L"chrome_launcher.exe";
> On 2011/01/24 15:08:42, robertshield wrote:
> > This is only used in the anonymous namespace above. Move it up.
> 
> Done.
> 
>
http://codereview.chromium.org/6355011/diff/8001/chrome_frame/ready_mode/inte...
> File chrome_frame/ready_mode/internal/registry_ready_mode_state.cc (right):
> 
>
http://codereview.chromium.org/6355011/diff/8001/chrome_frame/ready_mode/inte...
> chrome_frame/ready_mode/internal/registry_ready_mode_state.cc:120: }
> On 2011/01/24 06:21:00, erikwright wrote:
> > On 2011/01/24 05:54:50, amit wrote:
> > > Shouldn't this check be for MEDIUM_INTEGRITY (in order for launching from
> low
> > to
> > > medium integrity)?
> > 
> > Done.
> 
> By "Done", I meant, I added an implementation comment to the function
definition
> that hopefully makes it clear why this is HIGH_INTEGRITY.
> 
>
http://codereview.chromium.org/6355011/diff/8001/chrome_frame/ready_mode/inte...
> chrome_frame/ready_mode/internal/registry_ready_mode_state.cc:133: if
> (handle.IsValid() && CheckProcessExitCode(handle))
> On 2011/01/24 15:08:42, robertshield wrote:
> > This appears to wait for 5 seconds whereas chrome_launcher.exe which is
called
> > does an INFINITE wait on the elevated command. 
> > This means that when failing here, we don't know whether or not the elevated
> > command completed.
> 
> Yes. chrome_launcher will live as long as the elevated command. But here, we
> only wait 5 seconds. The reason is that, essentially, we are blocking the UI.
> The near term enhancement would be to make it asynchronous.
> 
> It is certainly possible that, after timing out, the installer will have
> completed. In that case, the impact is that this browser's state will not
> change, but future processes will reflect the change.
> 
> Again, this preserves the existing behaviour, which I think is acceptable for
> now. This can probably be fixed in branch.
> 
>
http://codereview.chromium.org/6355011/diff/8001/chrome_frame/update_launcher.cc
> File chrome_frame/update_launcher.cc (right):
> 
>
http://codereview.chromium.org/6355011/diff/8001/chrome_frame/update_launcher...
> chrome_frame/update_launcher.cc:43: args = ::CommandLineToArgvW(command_line,
> &num_args);
> On 2011/01/24 15:08:42, robertshield wrote:
> > The caller is supposed to free args when done (there's another case in
> > chrome_launcher.cc where this isn't done).
> > http://msdn.microsoft.com/en-us/library/bb776391%2528v=vs.85%2529.aspx
> 
> Done.
> 
>
http://codereview.chromium.org/6355011/diff/8001/chrome_frame/update_launcher...
> chrome_frame/update_launcher.cc:48: if (_wcsicmp(args[1], kUpdateCommandFlag)
!=
> 0)
> On 2011/01/24 15:08:42, robertshield wrote:
> > You should also check that args isn't NULL, to be safe.
> 
> Done.
> 
>
http://codereview.chromium.org/6355011/diff/8001/chrome_frame/update_launcher...
> chrome_frame/update_launcher.cc:78: exit_code = 
> WaitForProcessExitCode(process);
> On 2011/01/24 15:08:42, robertshield wrote:
> > nit: one too many spaces.
> 
> Done.

Powered by Google App Engine
This is Rietveld 408576698