Chromium Code Reviews| Index: chrome/installer/mini_installer/mini_installer.cc |
| diff --git a/chrome/installer/mini_installer/mini_installer.cc b/chrome/installer/mini_installer/mini_installer.cc |
| index 28a8057627e67353dc4fb8d737337f467ea22a56..976f5bd9906bed77cfb41e2cd21d05fd3ab9b4c5 100644 |
| --- a/chrome/installer/mini_installer/mini_installer.cc |
| +++ b/chrome/installer/mini_installer/mini_installer.cc |
| @@ -752,12 +752,14 @@ bool ShouldDeleteExtractedFiles() { |
| // executes setup.exe to do the install/upgrade. |
| int WMain(HMODULE module) { |
| #if defined(COMPONENT_BUILD) |
| - static const wchar_t kComponentBuildIncompatibleMessage[] = |
| - L"mini_installer.exe is incompatible with the component build, please run" |
| - L" setup.exe with the same command line instead. See" |
| - L" http://crbug.com/127233#c17 for details."; |
| - ::MessageBox(NULL, kComponentBuildIncompatibleMessage, NULL, MB_ICONERROR); |
| - return 1; |
| + if (::GetEnvironmentVariable(L"MINI_INSTALLER_TEST", NULL, 0) == 0) { |
| + static const wchar_t kComponentBuildIncompatibleMessage[] = |
| + L"mini_installer.exe is incompatible with the component build, please" |
| + L" run setup.exe with the same command line instead. See" |
| + L" http://crbug.com/127233#c17 for details."; |
| + ::MessageBox(NULL, kComponentBuildIncompatibleMessage, NULL, MB_ICONERROR); |
| + return 1; |
| + } |
| #endif |
| // Always start with deleting potential leftovers from previous installations. |
| @@ -775,6 +777,16 @@ int WMain(HMODULE module) { |
| if (!configuration.Initialize()) |
| return exit_code; |
| + if (configuration.query_component_build()) { |
| + // Return whether this is a component build then exit. This is used by |
|
grt (UTC plus 2)
2014/05/28 18:51:44
nit: returning is exiting. how about
// Exit i
robertshield
2014/05/28 21:27:30
Done.
|
| + // the tests in /src/chrome/test/mini_installer/. |
| +#if defined(COMPONENT_BUILD) |
| + return 1; |
| +#else |
| + return 0; |
| +#endif |
| + } |
| + |
| // If the --cleanup switch was specified on the command line, then that means |
| // we should only do the cleanup and then exit. |
| if (ProcessNonInstallOperations(configuration, &exit_code)) |