summaryrefslogtreecommitdiffstats
path: root/chrome/installer/setup
diff options
context:
space:
mode:
authorgab <gab@chromium.org>2015-08-13 05:03:03 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-13 12:03:29 +0000
commit5da23b096ded2291158b232abe238150af623a9c (patch)
treefe96d6220b488c940280292bcc30d49cbaae3bd2 /chrome/installer/setup
parentadfa5ab1a7cd3f26767a05428c4060356ed45049 (diff)
downloadchromium_src-5da23b096ded2291158b232abe238150af623a9c.zip
chromium_src-5da23b096ded2291158b232abe238150af623a9c.tar.gz
chromium_src-5da23b096ded2291158b232abe238150af623a9c.tar.bz2
Do not force restore shortcuts on OS upgrades.
And update some documentation. Related helper method to be cleaned in a follow-up CL. BUG=502363 Review URL: https://codereview.chromium.org/1275023005 Cr-Commit-Position: refs/heads/master@{#343179}
Diffstat (limited to 'chrome/installer/setup')
-rw-r--r--chrome/installer/setup/install.cc20
1 files changed, 7 insertions, 13 deletions
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc
index b0a4e62..9f7b6b3 100644
--- a/chrome/installer/setup/install.cc
+++ b/chrome/installer/setup/install.cc
@@ -37,7 +37,6 @@
#include "chrome/installer/util/master_preferences.h"
#include "chrome/installer/util/master_preferences_constants.h"
#include "chrome/installer/util/set_reg_value_work_item.h"
-#include "chrome/installer/util/shell_util.h"
#include "chrome/installer/util/util_constants.h"
#include "chrome/installer/util/work_item_list.h"
@@ -636,7 +635,7 @@ void HandleOsUpgradeForBrowser(const installer::InstallerState& installer_state,
ALL_USERS : CURRENT_USER;
base::FilePath chrome_exe(installer_state.target_path().Append(kChromeExe));
CreateOrUpdateShortcuts(chrome_exe, chrome, prefs, level,
- INSTALL_SHORTCUT_CREATE_EACH_IF_NO_SYSTEM_LEVEL);
+ INSTALL_SHORTCUT_REPLACE_EXISTING);
RegisterChromeOnMachine(installer_state, chrome, false);
UpdateOsUpgradeBeacon(installer_state.system_install(),
@@ -661,19 +660,14 @@ void HandleOsUpgradeForBrowser(const installer::InstallerState& installer_state,
}
// NOTE: Should the work done here, on Active Setup, change: kActiveSetupVersion
-// in install_worker.cc needs to be increased for Active Setup to invoke this
-// again for all users of this install.
+// in update_active_setup_version_work_item.cc needs to be increased for Active
+// Setup to invoke this again for all users of this install. It may also be
+// invoked again when a system-level chrome install goes through an OS upgrade.
void HandleActiveSetupForBrowser(const base::FilePath& installation_root,
const installer::Product& chrome,
bool force) {
DCHECK(chrome.is_chrome());
- // If the shortcuts are not being forcefully created we may want to forcefully
- // create them anyways if this Active Setup trigger is in response to an OS
- // update.
- force = force || installer::UpdateLastOSUpgradeHandledByActiveSetup(
- chrome.distribution());
-
// Only create shortcuts on Active Setup if the first run sentinel is not
// present for this user (as some shortcuts used to be installed on first
// run and this could otherwise re-install shortcuts for users that have
@@ -682,9 +676,9 @@ void HandleActiveSetupForBrowser(const base::FilePath& installation_root,
// shortcuts; if the decision is to create them, only shortcuts whose matching
// all-users shortcut isn't present on the system will be created.
InstallShortcutOperation install_operation =
- (!force && InstallUtil::IsFirstRunSentinelPresent() ?
- INSTALL_SHORTCUT_REPLACE_EXISTING :
- INSTALL_SHORTCUT_CREATE_EACH_IF_NO_SYSTEM_LEVEL);
+ (!force && InstallUtil::IsFirstRunSentinelPresent())
+ ? INSTALL_SHORTCUT_REPLACE_EXISTING
+ : INSTALL_SHORTCUT_CREATE_EACH_IF_NO_SYSTEM_LEVEL;
// Read master_preferences copied beside chrome.exe at install.
MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs));