OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/at_exit.h" | 10 #include "base/at_exit.h" |
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1087 if (installer::EULA_REJECTED != *exit_code) { | 1087 if (installer::EULA_REJECTED != *exit_code) { |
1088 GoogleUpdateSettings::SetEULAConsent( | 1088 GoogleUpdateSettings::SetEULAConsent( |
1089 original_state, BrowserDistribution::GetDistribution(), true); | 1089 original_state, BrowserDistribution::GetDistribution(), true); |
1090 } | 1090 } |
1091 } else if (cmd_line.HasSwitch( | 1091 } else if (cmd_line.HasSwitch( |
1092 installer::switches::kConfigureUserSettings)) { | 1092 installer::switches::kConfigureUserSettings)) { |
1093 DCHECK(installer_state->system_install()); | 1093 DCHECK(installer_state->system_install()); |
1094 const Product* chrome_install = | 1094 const Product* chrome_install = |
1095 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER); | 1095 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER); |
1096 DCHECK(chrome_install); | 1096 DCHECK(chrome_install); |
1097 // TODO(gab): Implement the new shortcut functionality here. | 1097 |
1098 LOG(ERROR) << "--configure-user-settings is not implemented."; | 1098 // Create user-level Start Menu shortcuts. |
grt (UTC plus 2)
2012/08/29 17:07:06
i think it'd be more clear to refer to "per-user"
gab
2012/08/29 21:53:00
I agree, I'll start using this and update document
| |
1099 // TODO(gab): This should really be more involved, but for now creating | |
1100 // the shortcut and leaving it non-updated in later updates is fine. | |
1101 // This is all coming in an upcoming refactoring of the shortcuts, but for | |
1102 // now this will simply create the user-level shortcut once on the first | |
1103 // (and only) invocation of Active Setup for Chrome for this user. | |
1104 ForceCreateUserLevelStartMenuShortcut(*installer_state, *chrome_install); | |
1105 | |
1099 } else if (cmd_line.HasSwitch( | 1106 } else if (cmd_line.HasSwitch( |
1100 installer::switches::kRegisterChromeBrowser)) { | 1107 installer::switches::kRegisterChromeBrowser)) { |
1101 installer::InstallStatus status = installer::UNKNOWN_STATUS; | 1108 installer::InstallStatus status = installer::UNKNOWN_STATUS; |
1102 const Product* chrome_install = | 1109 const Product* chrome_install = |
1103 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER); | 1110 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER); |
1104 if (chrome_install) { | 1111 if (chrome_install) { |
1105 // If --register-chrome-browser option is specified, register all | 1112 // If --register-chrome-browser option is specified, register all |
1106 // Chrome protocol/file associations, as well as register it as a valid | 1113 // Chrome protocol/file associations, as well as register it as a valid |
1107 // browser for Start Menu->Internet shortcut. This switch will also | 1114 // browser for Start Menu->Internet shortcut. This switch will also |
1108 // register Chrome as a valid handler for a set of URL protocols that | 1115 // register Chrome as a valid handler for a set of URL protocols that |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1499 if (!(installer_state.is_msi() && is_uninstall)) | 1506 if (!(installer_state.is_msi() && is_uninstall)) |
1500 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1507 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
1501 // to pass through, since this is only returned on uninstall which is | 1508 // to pass through, since this is only returned on uninstall which is |
1502 // never invoked directly by Google Update. | 1509 // never invoked directly by Google Update. |
1503 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1510 return_code = InstallUtil::GetInstallReturnCode(install_status); |
1504 | 1511 |
1505 VLOG(1) << "Installation complete, returning: " << return_code; | 1512 VLOG(1) << "Installation complete, returning: " << return_code; |
1506 | 1513 |
1507 return return_code; | 1514 return return_code; |
1508 } | 1515 } |
OLD | NEW |