Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: chrome/installer/setup/setup_main.cc

Issue 10889028: Install a user-level Start Menu shortcut for every user on system-installs through Active Setup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: grt comments Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 // then the dialog is shown and regardless of the outcome setup exits here. 1083 // then the dialog is shown and regardless of the outcome setup exits here.
1084 string16 inner_frame = 1084 string16 inner_frame =
1085 cmd_line.GetSwitchValueNative(installer::switches::kShowEula); 1085 cmd_line.GetSwitchValueNative(installer::switches::kShowEula);
1086 *exit_code = ShowEULADialog(inner_frame); 1086 *exit_code = ShowEULADialog(inner_frame);
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 // NOTE: Should the work done here, on kConfigureUserSettings, change:
1094 // kActiveSetupVersion in install_worker.cc needs to be increased for Active
1095 // Setup to invoke this again for all users of this install.
1093 DCHECK(installer_state->system_install()); 1096 DCHECK(installer_state->system_install());
grt (UTC plus 2) 2012/09/02 14:18:19 since it's legitimate for someone to inadvertently
gab 2012/09/02 16:15:12 Done and made InstallStatus better for this type o
grt (UTC plus 2) 2012/09/04 13:29:59 I don't think this new status code provides much o
gab 2012/09/04 15:40:36 As discussed, we would rather never see UNKNOWN_ST
1094 const Product* chrome_install = 1097 const Product* chrome_install =
1095 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER); 1098 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER);
1096 DCHECK(chrome_install); 1099
1097 // TODO(gab): Implement the new shortcut functionality here. 1100 // Create per-user Start Menu shortcuts.
1098 LOG(ERROR) << "--configure-user-settings is not implemented."; 1101 // TODO(gab): This should really be more involved, but for now creating
1102 // the shortcut and leaving it non-updated in later updates is fine.
1103 // This is all coming in an upcoming refactoring of the shortcuts, but for
1104 // now this will simply create the user-level shortcut once on the first
1105 // (and only) invocation of Active Setup for Chrome for this user.
1106 if (chrome_install)
1107 ForceCreateUserLevelStartMenuShortcut(*installer_state, *chrome_install);
1108 else
1109 NOTREACHED();
1110
1111 *exit_code = InstallUtil::GetInstallReturnCode(installer::INSTALL_REPAIRED);
1112
1099 } else if (cmd_line.HasSwitch( 1113 } else if (cmd_line.HasSwitch(
1100 installer::switches::kRegisterChromeBrowser)) { 1114 installer::switches::kRegisterChromeBrowser)) {
1101 installer::InstallStatus status = installer::UNKNOWN_STATUS; 1115 installer::InstallStatus status = installer::UNKNOWN_STATUS;
1102 const Product* chrome_install = 1116 const Product* chrome_install =
1103 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER); 1117 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER);
1104 if (chrome_install) { 1118 if (chrome_install) {
1105 // If --register-chrome-browser option is specified, register all 1119 // If --register-chrome-browser option is specified, register all
1106 // Chrome protocol/file associations, as well as register it as a valid 1120 // Chrome protocol/file associations, as well as register it as a valid
1107 // browser for Start Menu->Internet shortcut. This switch will also 1121 // browser for Start Menu->Internet shortcut. This switch will also
1108 // register Chrome as a valid handler for a set of URL protocols that 1122 // 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
1499 if (!(installer_state.is_msi() && is_uninstall)) 1513 if (!(installer_state.is_msi() && is_uninstall))
1500 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT 1514 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT
1501 // to pass through, since this is only returned on uninstall which is 1515 // to pass through, since this is only returned on uninstall which is
1502 // never invoked directly by Google Update. 1516 // never invoked directly by Google Update.
1503 return_code = InstallUtil::GetInstallReturnCode(install_status); 1517 return_code = InstallUtil::GetInstallReturnCode(install_status);
1504 1518
1505 VLOG(1) << "Installation complete, returning: " << return_code; 1519 VLOG(1) << "Installation complete, returning: " << return_code;
1506 1520
1507 return return_code; 1521 return return_code;
1508 } 1522 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698