OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <windows.h> | 5 #include <windows.h> |
6 #include <msi.h> | 6 #include <msi.h> |
7 #include <shellapi.h> | 7 #include <shellapi.h> |
8 #include <shlobj.h> | 8 #include <shlobj.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
697 } | 697 } |
698 | 698 |
699 private: | 699 private: |
700 bool initialized_; | 700 bool initialized_; |
701 }; | 701 }; |
702 | 702 |
703 bool PopulateInstallations(const MasterPreferences& prefs, | 703 bool PopulateInstallations(const MasterPreferences& prefs, |
704 ProductPackageMapping* installations) { | 704 ProductPackageMapping* installations) { |
705 DCHECK(installations); | 705 DCHECK(installations); |
706 bool success = true; | 706 bool success = true; |
707 if (prefs.install_chrome()) { | 707 |
708 bool implicit_chrome_install = false; | |
709 bool implicit_gcf_install = false; | |
710 | |
711 if (prefs.is_multi_install()) { | |
712 // See what products are already installed in multi mode. | |
713 // When we do multi installs, we must upgrade all installations | |
714 // in sync since they share the binaries. | |
715 struct CheckInstall { | |
716 bool* installed; | |
717 BrowserDistribution::Type type; | |
718 } product_checks[] = { | |
719 {&implicit_chrome_install, BrowserDistribution::CHROME_BROWSER}, | |
720 {&implicit_gcf_install, BrowserDistribution::CHROME_FRAME}, | |
721 }; | |
722 | |
723 for (size_t i = 0; i < arraysize(product_checks); ++i) { | |
724 BrowserDistribution* dist = BrowserDistribution::GetSpecificDistribution( | |
725 product_checks[i].type, prefs); | |
726 *product_checks[i].installed = installer::IsInstalledAsMulti( | |
727 installations->system_level(), dist); | |
728 } | |
729 } | |
730 | |
731 if (prefs.install_chrome() || implicit_chrome_install) { | |
708 VLOG(1) << "Install distribution: Chrome"; | 732 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
| |
709 success = installations->AddDistribution( | 733 success = installations->AddDistribution( |
710 BrowserDistribution::CHROME_BROWSER, prefs); | 734 BrowserDistribution::CHROME_BROWSER, prefs); |
711 } | 735 } |
712 | 736 |
713 if (success && prefs.install_chrome_frame()) { | 737 if (success && (prefs.install_chrome_frame() || implicit_gcf_install)) { |
714 VLOG(1) << "Install distribution: Chrome Frame"; | 738 VLOG(1) << "Install distribution: Chrome Frame"; |
715 success = installations->AddDistribution( | 739 success = installations->AddDistribution( |
716 BrowserDistribution::CHROME_FRAME, prefs); | 740 BrowserDistribution::CHROME_FRAME, prefs); |
717 } | 741 } |
718 return success; | 742 return success; |
719 } | 743 } |
720 | 744 |
721 // Returns the Custom information for the client identified by the exe path | 745 // Returns the Custom information for the client identified by the exe path |
722 // passed in. This information is used for crash reporting. | 746 // passed in. This information is used for crash reporting. |
723 google_breakpad::CustomClientInfo* GetCustomInfo(const wchar_t* exe_path) { | 747 google_breakpad::CustomClientInfo* GetCustomInfo(const wchar_t* exe_path) { |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
928 // to pass through, since this is only returned on uninstall which is | 952 // to pass through, since this is only returned on uninstall which is |
929 // never invoked directly by Google Update. | 953 // never invoked directly by Google Update. |
930 return_code = InstallUtil::GetInstallReturnCode(install_status); | 954 return_code = InstallUtil::GetInstallReturnCode(install_status); |
931 } | 955 } |
932 } | 956 } |
933 | 957 |
934 VLOG(1) << "Installation complete, returning: " << return_code; | 958 VLOG(1) << "Installation complete, returning: " << return_code; |
935 | 959 |
936 return return_code; | 960 return return_code; |
937 } | 961 } |
OLD | NEW |