summaryrefslogtreecommitdiffstats
path: root/chrome/installer
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-24 21:48:34 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-24 21:48:34 +0000
commit2c533896e85de3047519c4890f6b22e824d77669 (patch)
tree9e4b42a38ab4d7a79c1777b22ff509194d2dd292 /chrome/installer
parent5d943a10a4c7796367a5234df286576c4749e5ad (diff)
downloadchromium_src-2c533896e85de3047519c4890f6b22e824d77669.zip
chromium_src-2c533896e85de3047519c4890f6b22e824d77669.tar.gz
chromium_src-2c533896e85de3047519c4890f6b22e824d77669.tar.bz2
Revert "Do not send stats from Chromium builds."
This reverts commit 4a0189db765fe94f5df360c0907a585e26c9f681. Revert "Fix build break." This reverts commit eada493cf28975e56395aa3e2d3a0dc267a7f2c7. Review URL: http://codereview.chromium.org/92162 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14479 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r--chrome/installer/util/browser_distribution.cc13
-rw-r--r--chrome/installer/util/browser_distribution.h6
-rw-r--r--chrome/installer/util/google_chrome_distribution.cc13
-rw-r--r--chrome/installer/util/google_chrome_distribution.h6
-rw-r--r--chrome/installer/util/google_update_settings.cc29
5 files changed, 21 insertions, 46 deletions
diff --git a/chrome/installer/util/browser_distribution.cc b/chrome/installer/util/browser_distribution.cc
index 529d8ca..8cf587f 100644
--- a/chrome/installer/util/browser_distribution.cc
+++ b/chrome/installer/util/browser_distribution.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -7,9 +7,8 @@
// specific branding, we will need to extend this class with a custom
// implementation.
-#include "chrome/installer/util/browser_distribution.h"
-
#include "base/registry.h"
+#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/google_chrome_distribution.h"
BrowserDistribution* BrowserDistribution::GetDistribution() {
@@ -58,14 +57,6 @@ std::wstring BrowserDistribution::GetStateKey() {
return L"Software\\Chromium";
}
-std::wstring BrowserDistribution::GetStateMediumKey() {
- return L"Software\\Chromium";
-}
-
-std::wstring BrowserDistribution::GetStatsServerURL() {
- return L"";
-}
-
std::wstring BrowserDistribution::GetDistributionData(RegKey* key) {
return L"";
}
diff --git a/chrome/installer/util/browser_distribution.h b/chrome/installer/util/browser_distribution.h
index a525f61..1ac8ada 100644
--- a/chrome/installer/util/browser_distribution.h
+++ b/chrome/installer/util/browser_distribution.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -38,10 +38,6 @@ class BrowserDistribution {
virtual std::wstring GetStateKey();
- virtual std::wstring GetStateMediumKey();
-
- virtual std::wstring GetStatsServerURL();
-
virtual std::wstring GetDistributionData(RegKey* key);
virtual std::wstring GetUninstallLinkName();
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc
index f1b31b4..4cc7858 100644
--- a/chrome/installer/util/google_chrome_distribution.cc
+++ b/chrome/installer/util/google_chrome_distribution.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -227,17 +227,6 @@ std::wstring GoogleChromeDistribution::GetStateKey() {
return key;
}
-std::wstring GoogleChromeDistribution::GetStateMediumKey() {
- std::wstring key(google_update::kRegPathClientStateMedium);
- key.append(L"\\");
- key.append(google_update::kChromeGuid);
- return key;
-}
-
-std::wstring GoogleChromeDistribution::GetStatsServerURL() {
- return L"https://clients4.google.com/firefox/metrics/collect";
-}
-
std::wstring GoogleChromeDistribution::GetDistributionData(RegKey* key) {
DCHECK(NULL != key);
std::wstring sub_key(google_update::kRegPathClientState);
diff --git a/chrome/installer/util/google_chrome_distribution.h b/chrome/installer/util/google_chrome_distribution.h
index 4677e94..24b6930 100644
--- a/chrome/installer/util/google_chrome_distribution.h
+++ b/chrome/installer/util/google_chrome_distribution.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -60,10 +60,6 @@ class GoogleChromeDistribution : public BrowserDistribution {
virtual std::wstring GetStateKey();
- virtual std::wstring GetStateMediumKey();
-
- virtual std::wstring GetStatsServerURL();
-
// This method reads data from the Google Update ClientState key for
// potential use in the uninstall survey. It must be called before the
// key returned by GetVersionKey() is deleted.
diff --git a/chrome/installer/util/google_update_settings.cc b/chrome/installer/util/google_update_settings.cc
index cbd887d..326a595 100644
--- a/chrome/installer/util/google_update_settings.cc
+++ b/chrome/installer/util/google_update_settings.cc
@@ -1,18 +1,25 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/installer/util/google_update_settings.h"
#include "base/registry.h"
-#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/google_update_constants.h"
namespace {
+std::wstring GetClientStateKeyPath(const bool use_medium_key) {
+ std::wstring reg_path(use_medium_key ?
+ google_update::kRegPathClientStateMedium :
+ google_update::kRegPathClientState);
+ reg_path.append(L"\\");
+ reg_path.append(google_update::kChromeGuid);
+ return reg_path;
+}
+
bool ReadGoogleUpdateStrKey(const wchar_t* const name, std::wstring* value) {
- BrowserDistribution* dist = BrowserDistribution::GetDistribution();
- std::wstring reg_path = dist->GetStateKey();
+ std::wstring reg_path = GetClientStateKeyPath(false);
RegKey key(HKEY_CURRENT_USER, reg_path.c_str(), KEY_READ);
if (!key.ReadValue(name, value)) {
RegKey hklm_key(HKEY_LOCAL_MACHINE, reg_path.c_str(), KEY_READ);
@@ -22,8 +29,7 @@ bool ReadGoogleUpdateStrKey(const wchar_t* const name, std::wstring* value) {
}
bool ClearGoogleUpdateStrKey(const wchar_t* const name) {
- BrowserDistribution* dist = BrowserDistribution::GetDistribution();
- std::wstring reg_path = dist->GetStateKey();
+ std::wstring reg_path = GetClientStateKeyPath(false);
RegKey key(HKEY_CURRENT_USER, reg_path.c_str(), KEY_READ | KEY_WRITE);
std::wstring value;
if (!key.ReadValue(name, &value))
@@ -34,8 +40,7 @@ bool ClearGoogleUpdateStrKey(const wchar_t* const name) {
} // namespace.
bool GoogleUpdateSettings::GetCollectStatsConsent() {
- BrowserDistribution* dist = BrowserDistribution::GetDistribution();
- std::wstring reg_path = dist->GetStateKey();
+ std::wstring reg_path = GetClientStateKeyPath(false);
RegKey key(HKEY_CURRENT_USER, reg_path.c_str(), KEY_READ);
DWORD value;
if (!key.ReadValueDW(google_update::kRegUsageStatsField, &value)) {
@@ -49,19 +54,17 @@ bool GoogleUpdateSettings::GetCollectStatsConsent() {
bool GoogleUpdateSettings::SetCollectStatsConsent(bool consented) {
DWORD value = consented? 1 : 0;
// Writing to HKLM is only a best effort deal.
- BrowserDistribution* dist = BrowserDistribution::GetDistribution();
- std::wstring reg_path = dist->GetStateMediumKey();
+ std::wstring reg_path = GetClientStateKeyPath(true);
RegKey key_hklm(HKEY_LOCAL_MACHINE, reg_path.c_str(), KEY_READ | KEY_WRITE);
key_hklm.WriteValue(google_update::kRegUsageStatsField, value);
// Writing to HKCU is used both by chrome and by the crash reporter.
- reg_path = dist->GetStateKey();
+ reg_path = GetClientStateKeyPath(false);
RegKey key_hkcu(HKEY_CURRENT_USER, reg_path.c_str(), KEY_READ | KEY_WRITE);
return key_hkcu.WriteValue(google_update::kRegUsageStatsField, value);
}
bool GoogleUpdateSettings::SetEULAConsent(bool consented) {
- BrowserDistribution* dist = BrowserDistribution::GetDistribution();
- std::wstring reg_path = dist->GetStateMediumKey();
+ std::wstring reg_path = GetClientStateKeyPath(true);
RegKey key(HKEY_LOCAL_MACHINE, reg_path.c_str(), KEY_READ | KEY_SET_VALUE);
return key.WriteValue(google_update::kRegEULAAceptedField, consented? 1 : 0);
}