OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 16 matching lines...) Expand all Loading... | |
27 #include "base/win/windows_version.h" | 27 #include "base/win/windows_version.h" |
28 #include "breakpad/src/client/windows/handler/exception_handler.h" | 28 #include "breakpad/src/client/windows/handler/exception_handler.h" |
29 #include "chrome/common/chrome_switches.h" | 29 #include "chrome/common/chrome_switches.h" |
30 #include "chrome/installer/setup/chrome_frame_quick_enable.h" | 30 #include "chrome/installer/setup/chrome_frame_quick_enable.h" |
31 #include "chrome/installer/setup/chrome_frame_ready_mode.h" | 31 #include "chrome/installer/setup/chrome_frame_ready_mode.h" |
32 #include "chrome/installer/setup/install.h" | 32 #include "chrome/installer/setup/install.h" |
33 #include "chrome/installer/setup/install_worker.h" | 33 #include "chrome/installer/setup/install_worker.h" |
34 #include "chrome/installer/setup/setup_constants.h" | 34 #include "chrome/installer/setup/setup_constants.h" |
35 #include "chrome/installer/setup/setup_util.h" | 35 #include "chrome/installer/setup/setup_util.h" |
36 #include "chrome/installer/setup/uninstall.h" | 36 #include "chrome/installer/setup/uninstall.h" |
37 #include "chrome/installer/util/auto_launch_util.h" | |
37 #include "chrome/installer/util/browser_distribution.h" | 38 #include "chrome/installer/util/browser_distribution.h" |
38 #include "chrome/installer/util/channel_info.h" | 39 #include "chrome/installer/util/channel_info.h" |
39 #include "chrome/installer/util/delete_after_reboot_helper.h" | 40 #include "chrome/installer/util/delete_after_reboot_helper.h" |
40 #include "chrome/installer/util/delete_tree_work_item.h" | 41 #include "chrome/installer/util/delete_tree_work_item.h" |
41 #include "chrome/installer/util/google_update_constants.h" | 42 #include "chrome/installer/util/google_update_constants.h" |
42 #include "chrome/installer/util/google_update_settings.h" | 43 #include "chrome/installer/util/google_update_settings.h" |
43 #include "chrome/installer/util/helper.h" | 44 #include "chrome/installer/util/helper.h" |
44 #include "chrome/installer/util/html_dialog.h" | 45 #include "chrome/installer/util/html_dialog.h" |
45 #include "chrome/installer/util/install_util.h" | 46 #include "chrome/installer/util/install_util.h" |
46 #include "chrome/installer/util/installation_state.h" | 47 #include "chrome/installer/util/installation_state.h" |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
711 if (install_status == installer::FIRST_INSTALL_SUCCESS) { | 712 if (install_status == installer::FIRST_INSTALL_SUCCESS) { |
712 VLOG(1) << "First install successful."; | 713 VLOG(1) << "First install successful."; |
713 if (chrome_install) { | 714 if (chrome_install) { |
714 // We never want to launch Chrome in system level install mode. | 715 // We never want to launch Chrome in system level install mode. |
715 bool do_not_launch_chrome = false; | 716 bool do_not_launch_chrome = false; |
716 prefs.GetBool( | 717 prefs.GetBool( |
717 installer::master_preferences::kDoNotLaunchChrome, | 718 installer::master_preferences::kDoNotLaunchChrome, |
718 &do_not_launch_chrome); | 719 &do_not_launch_chrome); |
719 if (!system_install && !do_not_launch_chrome) | 720 if (!system_install && !do_not_launch_chrome) |
720 chrome_install->LaunchChrome(installer_state.target_path()); | 721 chrome_install->LaunchChrome(installer_state.target_path()); |
722 | |
723 // Add auto-launch key if specified in master preferences. | |
grt (UTC plus 2)
2011/11/29 18:55:45
i think this belongs in install.cc's InstallOrUpda
Finnur
2011/11/29 23:48:30
Moved.
| |
724 bool auto_launch_chrome = false; | |
725 prefs.GetBool( | |
726 installer::master_preferences::kAutoLaunchChrome, | |
727 &auto_launch_chrome); | |
728 if (auto_launch_chrome) { | |
729 auto_launch_util::SetIsAutoLaunched( | |
730 true, installer_state.target_path()); | |
731 } | |
721 } | 732 } |
722 } else if ((install_status == installer::NEW_VERSION_UPDATED) || | 733 } else if ((install_status == installer::NEW_VERSION_UPDATED) || |
723 (install_status == installer::IN_USE_UPDATED)) { | 734 (install_status == installer::IN_USE_UPDATED)) { |
724 const Product* chrome = installer_state.FindProduct( | 735 const Product* chrome = installer_state.FindProduct( |
725 BrowserDistribution::CHROME_BROWSER); | 736 BrowserDistribution::CHROME_BROWSER); |
726 if (chrome != NULL) | 737 if (chrome != NULL) |
727 installer::RemoveChromeLegacyRegistryKeys(chrome->distribution()); | 738 installer::RemoveChromeLegacyRegistryKeys(chrome->distribution()); |
728 } | 739 } |
729 } | 740 } |
730 } | 741 } |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1340 if (!(installer_state.is_msi() && is_uninstall)) | 1351 if (!(installer_state.is_msi() && is_uninstall)) |
1341 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1352 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
1342 // to pass through, since this is only returned on uninstall which is | 1353 // to pass through, since this is only returned on uninstall which is |
1343 // never invoked directly by Google Update. | 1354 // never invoked directly by Google Update. |
1344 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1355 return_code = InstallUtil::GetInstallReturnCode(install_status); |
1345 | 1356 |
1346 VLOG(1) << "Installation complete, returning: " << return_code; | 1357 VLOG(1) << "Installation complete, returning: " << return_code; |
1347 | 1358 |
1348 return return_code; | 1359 return return_code; |
1349 } | 1360 } |
OLD | NEW |