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..728e7f8818459a02a080ae4f0b55af9f75fe27ef 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,17 @@ int WMain(HMODULE module) { |
if (!configuration.Initialize()) |
return exit_code; |
+ if (configuration.query_component_build()) { |
+ // Exit immediately with an exit code of 1 to indicate component build and 0 |
+ // to indicate static build. This is used by 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)) |