Chromium Code Reviews| Index: chrome/installer/setup/setup_main.cc |
| diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc |
| index 735be3fda9da4a0a428043fe7d1fec7d85f3a501..57f2c5b97243f073ced03878de01b3427cf3753c 100644 |
| --- a/chrome/installer/setup/setup_main.cc |
| +++ b/chrome/installer/setup/setup_main.cc |
| @@ -14,6 +14,7 @@ |
| #include "base/command_line.h" |
| #include "base/file_util.h" |
| #include "base/file_version_info.h" |
| +#include "base/files/file_path.h" |
| #include "base/files/scoped_temp_dir.h" |
| #include "base/path_service.h" |
| #include "base/process_util.h" |
| @@ -491,7 +492,6 @@ bool CheckAppHostPreconditions(const InstallationState& original_state, |
| InstallerState* installer_state, |
| installer::InstallStatus* status) { |
| if (installer_state->FindProduct(BrowserDistribution::CHROME_APP_HOST)) { |
| - |
| if (!installer_state->is_multi_install()) { |
| LOG(DFATAL) << "App Launcher requires multi install"; |
| *status = installer::APP_HOST_REQUIRES_MULTI_INSTALL; |
| @@ -507,7 +507,6 @@ bool CheckAppHostPreconditions(const InstallationState& original_state, |
| installer_state->WriteInstallerResult(*status, 0, NULL); |
| return false; |
| } |
| - |
| } |
| return true; |
| @@ -1477,8 +1476,27 @@ bool HandleNonInstallCmdLineOptions(const InstallationState& original_state, |
| } else if (cmd_line.HasSwitch(installer::switches::kChromeFrameQuickEnable)) { |
| *exit_code = installer::ChromeFrameQuickEnable(original_state, |
| installer_state); |
| - } else { |
| - handled = false; |
| + } else if (cmd_line.HasSwitch(installer::switches::kPatch)) { |
| + const std::string patch_type_str( |
| + cmd_line.GetSwitchValueASCII(installer::switches::kPatch)); |
| + const base::FilePath input_file( |
| + cmd_line.GetSwitchValuePath(installer::switches::kInputFile)); |
| + const base::FilePath patch_file( |
| + cmd_line.GetSwitchValuePath(installer::switches::kPatchFile)); |
| + const base::FilePath output_file( |
| + cmd_line.GetSwitchValuePath(installer::switches::kOutputFile)); |
| + |
| + if (patch_type_str == installer::switches::kCourgette) { |
| + *exit_code = installer::CourgettePatchFiles(input_file, |
| + patch_file, |
| + output_file); |
| + } else if (patch_type_str == installer::switches::kBsdiff) { |
| + *exit_code = installer::BsdiffPatchFiles(input_file, |
| + patch_file, |
| + output_file); |
| + } else { |
| + *exit_code = installer::PATCH_INVALID_ARGUMENTS; |
| + } |
| } |
|
robertshield
2013/06/17 17:47:00
we seem to have lost the "handled = false" else cl
Sorin Jianu
2013/06/17 22:21:09
thank you!
|
| return handled; |