diff options
author | huangs@chromium.org <huangs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-09 05:30:08 +0000 |
---|---|---|
committer | huangs@chromium.org <huangs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-09 05:30:08 +0000 |
commit | 8dcbb7c4b16051711a830cc8b63df19311fa031f (patch) | |
tree | b5971400d2761b15e92677724503435707300276 /chrome/installer/setup | |
parent | 9df969d8ca25c56c7e2acc58c86261eaec432387 (diff) | |
download | chromium_src-8dcbb7c4b16051711a830cc8b63df19311fa031f.zip chromium_src-8dcbb7c4b16051711a830cc8b63df19311fa031f.tar.gz chromium_src-8dcbb7c4b16051711a830cc8b63df19311fa031f.tar.bz2 |
Quick fix to get 7DA counts for unified Chrome / App Launcher.
To enable 7DA counts for App Launcher, the following is needed:
- On execution, App Launcher sets "dr" to "1" in its DidRun key, i.e.:
HKCU\Software\Google\Update\ClientState\{FDA71E6F-AC4C-4a00-8B70-9958A68906BF}\dr
- "Present version" key is set for the App Launcher's clients (at user/system level):
(HKCU\HKLM)\Software\Google\Update\Clients\{FDA71E6F-AC4C-4a00-8B70-9958A68906BF}\pv
- Google Update is installed.
Ultimately we wish to rely on https://chromiumcodereview.appspot.com/14031025 to perform the proper migration. However, there is need to get the 7DA data ASAP, so this CL implements a quick fix to set the "dr" key. Specifically:
- In app_list_controller_win.cc: Removed check for presence of obsolete App Launcher artifacts, so the "dr" key (in user-level) is written whenever App Launcher runs.
- In install_worker.cc: If multi-install Chrome is installed, *in the absence* of the deprecated App Launcher (needed for backward compatiblity), create "shadow" App Launcher key for "pv".
- In uninstall.cc: Cleanup this shadow App Launcher key. Again, backward compatibility is support people who have the old stand-alone App Launcher, before we land the real fix 14031025.
BUG=233295
Review URL: https://chromiumcodereview.appspot.com/14711006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/setup')
-rw-r--r-- | chrome/installer/setup/install_worker.cc | 15 | ||||
-rw-r--r-- | chrome/installer/setup/uninstall.cc | 21 |
2 files changed, 36 insertions, 0 deletions
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc index 5450e32..c922190 100644 --- a/chrome/installer/setup/install_worker.cc +++ b/chrome/installer/setup/install_worker.cc @@ -1223,6 +1223,21 @@ void AddInstallWorkItems(const InstallationState& original_state, install_list); } + // TODO(huangs): Implement actual migration code and remove the hack below. + // If installing Chrome without the legacy stand-alone App Launcher (to be + // handled later), add "shadow" App Launcher registry keys so Google Update + // would recognize the "dr" value in the App Launcher ClientState key. + // Checking .is_multi_install() excludes Chrome Canary and stand-alone Chrome. + if (installer_state.is_multi_install() && + installer_state.FindProduct(BrowserDistribution::CHROME_BROWSER) && + !installer_state.FindProduct(BrowserDistribution::CHROME_APP_HOST)) { + BrowserDistribution* shadow_app_launcher_dist = + BrowserDistribution::GetSpecificDistribution( + BrowserDistribution::CHROME_APP_HOST); + AddVersionKeyWorkItems(root, shadow_app_launcher_dist, new_version, + add_language_identifier, install_list); + } + // Add any remaining work items that involve special settings for // each product. AddProductSpecificWorkItems(original_state, installer_state, setup_path, diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc index 295028c..e86a867 100644 --- a/chrome/installer/setup/uninstall.cc +++ b/chrome/installer/setup/uninstall.cc @@ -24,6 +24,7 @@ #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths_internal.h" #include "chrome/common/chrome_result_codes.h" +#include "chrome/installer/launcher_support/chrome_launcher_support.h" #include "chrome/installer/setup/install.h" #include "chrome/installer/setup/install_worker.h" #include "chrome/installer/setup/setup_constants.h" @@ -1231,6 +1232,26 @@ InstallStatus UninstallProduct(const InstallationState& original_state, // Notify the shell that associations have changed since Chrome was likely // unregistered. SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL); + + // TODO(huangs): Implement actual migration code and remove the hack below. + // Remove the "shadow" App Launcher registry keys. + if (installer_state.is_multi_install()) { + // If we're not uninstalling the legacy App Launcher, and if it was + // not installed in the first place, then delete the "shadow" keys. + chrome_launcher_support::InstallationState level_to_check = + installer_state.system_install() ? + chrome_launcher_support::INSTALLED_AT_SYSTEM_LEVEL : + chrome_launcher_support::INSTALLED_AT_USER_LEVEL; + bool has_legacy_app_launcher = level_to_check == + chrome_launcher_support::GetAppLauncherInstallationState(); + if (!has_legacy_app_launcher) { + BrowserDistribution* shadow_app_launcher_dist = + BrowserDistribution::GetSpecificDistribution( + BrowserDistribution::CHROME_APP_HOST); + InstallUtil::DeleteRegistryKey(reg_root, + shadow_app_launcher_dist->GetVersionKey()); + } + } } if (product.is_chrome_frame()) { |