diff options
author | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-24 19:14:11 +0000 |
---|---|---|
committer | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-24 19:14:11 +0000 |
commit | efd97484dbba5faec394693002228a1f0e2c2f82 (patch) | |
tree | fcf94e84e1dc8213debb308fc4c405738eac3543 /chrome_frame/chrome_launcher_main.cc | |
parent | 30aa3ee0461f0475180d50d4adc4b925fe7e1315 (diff) | |
download | chromium_src-efd97484dbba5faec394693002228a1f0e2c2f82.zip chromium_src-efd97484dbba5faec394693002228a1f0e2c2f82.tar.gz chromium_src-efd97484dbba5faec394693002228a1f0e2c2f82.tar.bz2 |
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.
Review URL: http://codereview.chromium.org/6355011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72361 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_launcher_main.cc')
-rw-r--r-- | chrome_frame/chrome_launcher_main.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome_frame/chrome_launcher_main.cc b/chrome_frame/chrome_launcher_main.cc index d56ca92..5716345 100644 --- a/chrome_frame/chrome_launcher_main.cc +++ b/chrome_frame/chrome_launcher_main.cc @@ -2,14 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - #include <windows.h> #include <DbgHelp.h> #include <string> #include "chrome_frame/chrome_launcher.h" #include "chrome_frame/crash_server_init.h" - +#include "chrome_frame/update_launcher.h" int APIENTRY wWinMain(HINSTANCE, HINSTANCE, wchar_t*, int) { const wchar_t* cmd_line = ::GetCommandLine(); @@ -17,10 +16,15 @@ int APIENTRY wWinMain(HINSTANCE, HINSTANCE, wchar_t*, int) { google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad( InitializeCrashReporting(cmd_line)); + std::wstring update_command( + update_launcher::GetUpdateCommandFromArguments(cmd_line)); + UINT exit_code = ERROR_FILE_NOT_FOUND; - if (chrome_launcher::SanitizeAndLaunchChrome(::GetCommandLine())) { + + if (!update_command.empty()) + exit_code = update_launcher::LaunchUpdateCommand(update_command); + else if (chrome_launcher::SanitizeAndLaunchChrome(cmd_line)) exit_code = ERROR_SUCCESS; - } return exit_code; } |