summaryrefslogtreecommitdiffstats
path: root/chrome/installer
diff options
context:
space:
mode:
authorrogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-29 21:59:27 +0000
committerrogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-29 21:59:27 +0000
commitbbd15f67499da499cab76c084c1b04a3d248a2c3 (patch)
tree40c57345945c9fad14602068c69b54f964803af3 /chrome/installer
parenta9cf9e79c9ffc3c3fe9c87f7c0bd64a8fcdf65dc (diff)
downloadchromium_src-bbd15f67499da499cab76c084c1b04a3d248a2c3.zip
chromium_src-bbd15f67499da499cab76c084c1b04a3d248a2c3.tar.gz
chromium_src-bbd15f67499da499cab76c084c1b04a3d248a2c3.tar.bz2
Fix two problems found while testing chrome reactivation:
- C1S events were not being sent out for reactivated brand code. In the reactivation brand, the code was getting a cached copy of the RLZ string for the main brand code and thinking it had already set the C1S event - on uninstall, reactivation values remained in registry. Fixed the uninstaller to call RlZTracker::ClearProductState() so that the reactivation brand code case is handled as well BUG=90886 TEST=See RLZ test plan Review URL: http://codereview.chromium.org/7532005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94767 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r--chrome/installer/setup/uninstall.cc24
1 files changed, 18 insertions, 6 deletions
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc
index c812e79..f0d7a58 100644
--- a/chrome/installer/setup/uninstall.cc
+++ b/chrome/installer/setup/uninstall.cc
@@ -25,6 +25,7 @@
#include "chrome/installer/util/channel_info.h"
#include "chrome/installer/util/delete_after_reboot_helper.h"
#include "chrome/installer/util/google_update_constants.h"
+#include "chrome/installer/util/google_update_settings.h"
#include "chrome/installer/util/helper.h"
#include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/installation_state.h"
@@ -118,6 +119,21 @@ void ProcessQuickEnableWorkItems(
LOG(ERROR) << "Failed to update quick-enable-cf command.";
}
+void ClearRlzProductState() {
+ const rlz_lib::AccessPoint points[] = {rlz_lib::CHROME_OMNIBOX,
+ rlz_lib::CHROME_HOME_PAGE,
+ rlz_lib::NO_ACCESS_POINT};
+
+ rlz_lib::ClearProductState(rlz_lib::CHROME, points);
+
+ // If chrome has been reactivated, clear all events for this brand as well.
+ std::wstring reactivation_brand;
+ if (GoogleUpdateSettings::GetReactivationBrand(&reactivation_brand)) {
+ rlz_lib::SupplementaryBranding branding(reactivation_brand.c_str());
+ rlz_lib::ClearProductState(rlz_lib::CHROME, points);
+ }
+}
+
} // namespace
namespace installer {
@@ -689,12 +705,8 @@ InstallStatus UninstallProduct(const InstallationState& original_state,
// Chrome is not in use so lets uninstall Chrome by deleting various files
// and registry entries. Here we will just make best effort and keep going
// in case of errors.
- if (is_chrome) {
- const rlz_lib::AccessPoint access_points[] = {rlz_lib::CHROME_OMNIBOX,
- rlz_lib::CHROME_HOME_PAGE,
- rlz_lib::NO_ACCESS_POINT};
- rlz_lib::ClearProductState(rlz_lib::CHROME, access_points);
- }
+ if (is_chrome)
+ ClearRlzProductState();
// First delete shortcuts from Start->Programs, Desktop & Quick Launch.
DeleteChromeShortcuts(installer_state, product);