summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util/google_chrome_distribution.cc
diff options
context:
space:
mode:
authorrobertshield@google.com <robertshield@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-20 19:07:32 +0000
committerrobertshield@google.com <robertshield@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-20 19:07:32 +0000
commitc98911a3fe397932e43700219ba22fa725745cac (patch)
treef5a64579b53aa653dd0b60361b46de62419bc2ba /chrome/installer/util/google_chrome_distribution.cc
parent86e6ee66939784971858201236b02f353ab76f2d (diff)
downloadchromium_src-c98911a3fe397932e43700219ba22fa725745cac.zip
chromium_src-c98911a3fe397932e43700219ba22fa725745cac.tar.gz
chromium_src-c98911a3fe397932e43700219ba22fa725745cac.tar.bz2
Add brand code submission to Google Chrome uninstall metrics.
Review URL: http://codereview.chromium.org/78005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14045 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/google_chrome_distribution.cc')
-rw-r--r--chrome/installer/util/google_chrome_distribution.cc28
1 files changed, 27 insertions, 1 deletions
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc
index 278a6e7..4cc7858 100644
--- a/chrome/installer/util/google_chrome_distribution.cc
+++ b/chrome/installer/util/google_chrome_distribution.cc
@@ -107,7 +107,8 @@ bool GoogleChromeDistribution::ExtractUninstallMetrics(
}
void GoogleChromeDistribution::DoPostUninstallOperations(
- const installer::Version& version, const std::wstring& local_data_path) {
+ const installer::Version& version, const std::wstring& local_data_path,
+ const std::wstring& distribution_data) {
// Send the Chrome version and OS version as params to the form.
// It would be nice to send the locale, too, but I don't see an
// easy way to get that in the existing code. It's something we
@@ -139,7 +140,13 @@ void GoogleChromeDistribution::DoPostUninstallOperations(
std::wstring uninstall_metrics;
if (ExtractUninstallMetricsFromFile(local_data_path, &uninstall_metrics)) {
+ // The user has opted into anonymous usage data collection, so append
+ // metrics and distribution data.
command += uninstall_metrics;
+ if (!distribution_data.empty()) {
+ command += L"&";
+ command += distribution_data;
+ }
}
int pid = 0;
@@ -220,6 +227,25 @@ std::wstring GoogleChromeDistribution::GetStateKey() {
return key;
}
+std::wstring GoogleChromeDistribution::GetDistributionData(RegKey* key) {
+ DCHECK(NULL != key);
+ std::wstring sub_key(google_update::kRegPathClientState);
+ sub_key.append(L"\\");
+ sub_key.append(google_update::kChromeGuid);
+
+ RegKey client_state_key(key->Handle(), sub_key.c_str());
+ std::wstring result;
+ std::wstring brand_value;
+ if (client_state_key.ReadValue(google_update::kRegRLZBrandField,
+ &brand_value)) {
+ result = google_update::kRegRLZBrandField;
+ result.append(L"=");
+ result.append(brand_value);
+ }
+
+ return result;
+}
+
std::wstring GoogleChromeDistribution::GetUninstallLinkName() {
const std::wstring& link_name =
installer_util::GetLocalizedString(IDS_UNINSTALL_CHROME_BASE);