Chromium Code Reviews| Index: chrome/installer/setup/setup_main.cc |
| =================================================================== |
| --- chrome/installer/setup/setup_main.cc (revision 70232) |
| +++ chrome/installer/setup/setup_main.cc (working copy) |
| @@ -704,13 +704,37 @@ |
| ProductPackageMapping* installations) { |
| DCHECK(installations); |
| bool success = true; |
| - if (prefs.install_chrome()) { |
| + |
| + bool implicit_chrome_install = false; |
| + bool implicit_gcf_install = false; |
| + |
| + if (prefs.is_multi_install()) { |
| + // See what products are already installed in multi mode. |
| + // When we do multi installs, we must upgrade all installations |
| + // in sync since they share the binaries. |
| + struct CheckInstall { |
| + bool* installed; |
| + BrowserDistribution::Type type; |
| + } product_checks[] = { |
| + {&implicit_chrome_install, BrowserDistribution::CHROME_BROWSER}, |
| + {&implicit_gcf_install, BrowserDistribution::CHROME_FRAME}, |
| + }; |
| + |
| + for (size_t i = 0; i < arraysize(product_checks); ++i) { |
| + BrowserDistribution* dist = BrowserDistribution::GetSpecificDistribution( |
| + product_checks[i].type, prefs); |
| + *product_checks[i].installed = installer::IsInstalledAsMulti( |
| + installations->system_level(), dist); |
| + } |
| + } |
| + |
| + if (prefs.install_chrome() || implicit_chrome_install) { |
| VLOG(1) << "Install distribution: Chrome"; |
|
grt (UTC plus 2)
2010/12/29 16:51:50
It might be useful for the log to indicate that a
tommi (sloooow) - chröme
2010/12/29 17:30:09
Added a LOG_IF(INFO, *installed) to the loop above
|
| success = installations->AddDistribution( |
| BrowserDistribution::CHROME_BROWSER, prefs); |
| } |
| - if (success && prefs.install_chrome_frame()) { |
| + if (success && (prefs.install_chrome_frame() || implicit_gcf_install)) { |
| VLOG(1) << "Install distribution: Chrome Frame"; |
| success = installations->AddDistribution( |
| BrowserDistribution::CHROME_FRAME, prefs); |