summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-31 16:15:38 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-31 16:15:38 +0000
commite27022f2a07acc7df33f60c5e600906977b1dd17 (patch)
tree362eb589b0b2e88e9758a29f12c1528d2eb17ddc /chrome/app
parent1e314cf0de24d58991e66f8d66e09e6cb1454770 (diff)
downloadchromium_src-e27022f2a07acc7df33f60c5e600906977b1dd17.zip
chromium_src-e27022f2a07acc7df33f60c5e600906977b1dd17.tar.gz
chromium_src-e27022f2a07acc7df33f60c5e600906977b1dd17.tar.bz2
Consolidate same constant defined in three different places. No change in chrome.exe size.
Review URL: http://codereview.chromium.org/8409 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4284 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/google_update_client.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/chrome/app/google_update_client.cc b/chrome/app/google_update_client.cc
index 8c0e168..b691ec5 100644
--- a/chrome/app/google_update_client.cc
+++ b/chrome/app/google_update_client.cc
@@ -8,14 +8,9 @@
#include <strsafe.h>
#include "chrome/app/client_util.h"
+#include "chrome/installer/util/google_update_constants.h"
namespace {
-const wchar_t kRegistryClients[] = L"Software\\Google\\Update\\Clients\\";
-const wchar_t kRegistryClientState[] =
- L"Software\\Google\\Update\\ClientState\\";
-const wchar_t kRequestParamDidRun[] = L"dr";
-const wchar_t kRegistryUpdate[] = L"Software\\Google\\Update\\";
-const wchar_t kRegistryValueCrashReportPath[] = L"CrashReportPath";
const wchar_t kEnvProductVersionKey[] = L"CHROME_VERSION";
// Allocates the out param on success.
@@ -86,12 +81,12 @@ bool GoogleUpdateClient::Launch(HINSTANCE instance,
if (NULL != entry) {
// record did_run "dr" in client state
HKEY reg_root = (user_mode_) ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE;
- std::wstring key_path = kRegistryClientState + guid_;
+ std::wstring key_path = google_update::kRegPathClientState + guid_;
HKEY reg_key;
if (::RegOpenKeyEx(reg_root, key_path.c_str(), 0,
KEY_WRITE, &reg_key) == ERROR_SUCCESS) {
const wchar_t kVal[] = L"1";
- ::RegSetValueEx(reg_key, kRequestParamDidRun, 0, REG_SZ,
+ ::RegSetValueEx(reg_key, google_update::kRegDidRunField, 0, REG_SZ,
reinterpret_cast<const BYTE *>(kVal), sizeof(kVal));
::RegCloseKey(reg_key);
}
@@ -122,7 +117,7 @@ bool GoogleUpdateClient::Init(const wchar_t* client_guid,
if (GoogleUpdateEnvQueryStr(kEnvProductVersionKey, &version_)) {
ret = true;
} else {
- std::wstring key(kRegistryClients);
+ std::wstring key(google_update::kRegPathClients);
key.append(guid_);
if (client_util::GetChromiumVersion(dll_path_, key.c_str(), &version_))
ret = true;