summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util/google_update_settings.cc
diff options
context:
space:
mode:
authorgrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-15 12:00:30 +0000
committergrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-15 12:00:30 +0000
commit2614ed923300f66bd8f9bd2d109f0be5eed69a0d (patch)
treeef38fcb7c9765d886b97d9c13e2eef7e54d7f8eb /chrome/installer/util/google_update_settings.cc
parent1b3f6b7b95f4534eab79c01cb46c209003a3a890 (diff)
downloadchromium_src-2614ed923300f66bd8f9bd2d109f0be5eed69a0d.zip
chromium_src-2614ed923300f66bd8f9bd2d109f0be5eed69a0d.tar.gz
chromium_src-2614ed923300f66bd8f9bd2d109f0be5eed69a0d.tar.bz2
Launch Google Update on uninstall.
So it can self-destruct if Chrome (or Chrome Frame) was the last Omaha-managed product on the system. BUG=114786 TEST=Install Google Update 1.3.21.105 or later and Chrome w/ --verbose-logging. Uninstall Chrome and see that Google Update vanishes immediately. Take a look at chrome_installer.log and look for messages related to Launching Google Update's uninstaller. Review URL: http://codereview.chromium.org/9693055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/google_update_settings.cc')
-rw-r--r--chrome/installer/util/google_update_settings.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/installer/util/google_update_settings.cc b/chrome/installer/util/google_update_settings.cc
index 13d6185..1278c76 100644
--- a/chrome/installer/util/google_update_settings.cc
+++ b/chrome/installer/util/google_update_settings.cc
@@ -531,3 +531,16 @@ GoogleUpdateSettings::UpdatePolicy GoogleUpdateSettings::GetAppUpdatePolicy(
return update_policy;
}
+
+string16 GoogleUpdateSettings::GetUninstallCommandLine(bool system_install) {
+ const HKEY root_key = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
+ string16 cmd_line;
+ RegKey update_key;
+
+ if (update_key.Open(root_key, google_update::kRegPathGoogleUpdate,
+ KEY_QUERY_VALUE) == ERROR_SUCCESS) {
+ update_key.ReadValue(google_update::kRegUninstallCmdLine, &cmd_line);
+ }
+
+ return cmd_line;
+}