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

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: comments + exit code + create shell notify 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 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 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
grt (UTC plus 2) 2012/09/01 03:20:28 please put a big honking notice here stating that
gab 2012/09/01 22:28:40 Done.
1097 // TODO(gab): Implement the new shortcut functionality here. 1097 // Create per-user Start Menu shortcuts.
1098 LOG(ERROR) << "--configure-user-settings is not implemented."; 1098 // TODO(gab): This should really be more involved, but for now creating
1099 // the shortcut and leaving it non-updated in later updates is fine.
1100 // This is all coming in an upcoming refactoring of the shortcuts, but for
1101 // now this will simply create the user-level shortcut once on the first
1102 // (and only) invocation of Active Setup for Chrome for this user.
1103 if (chrome_install)
1104 ForceCreateUserLevelStartMenuShortcut(*installer_state, *chrome_install);
1105 else
1106 NOTREACHED();
1107
1108 *exit_code = InstallUtil::GetInstallReturnCode(installer::INSTALL_REPAIRED);
1109
1099 } else if (cmd_line.HasSwitch( 1110 } else if (cmd_line.HasSwitch(
1100 installer::switches::kRegisterChromeBrowser)) { 1111 installer::switches::kRegisterChromeBrowser)) {
1101 installer::InstallStatus status = installer::UNKNOWN_STATUS; 1112 installer::InstallStatus status = installer::UNKNOWN_STATUS;
1102 const Product* chrome_install = 1113 const Product* chrome_install =
1103 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER); 1114 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER);
1104 if (chrome_install) { 1115 if (chrome_install) {
1105 // If --register-chrome-browser option is specified, register all 1116 // If --register-chrome-browser option is specified, register all
1106 // Chrome protocol/file associations, as well as register it as a valid 1117 // Chrome protocol/file associations, as well as register it as a valid
1107 // browser for Start Menu->Internet shortcut. This switch will also 1118 // browser for Start Menu->Internet shortcut. This switch will also
1108 // register Chrome as a valid handler for a set of URL protocols that 1119 // 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)) 1510 if (!(installer_state.is_msi() && is_uninstall))
1500 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT 1511 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT
1501 // to pass through, since this is only returned on uninstall which is 1512 // to pass through, since this is only returned on uninstall which is
1502 // never invoked directly by Google Update. 1513 // never invoked directly by Google Update.
1503 return_code = InstallUtil::GetInstallReturnCode(install_status); 1514 return_code = InstallUtil::GetInstallReturnCode(install_status);
1504 1515
1505 VLOG(1) << "Installation complete, returning: " << return_code; 1516 VLOG(1) << "Installation complete, returning: " << return_code;
1506 1517
1507 return return_code; 1518 return return_code;
1508 } 1519 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698