diff options
author | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 21:56:55 +0000 |
---|---|---|
committer | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 21:56:55 +0000 |
commit | c157279b239fe6ece8bab2ddcec43ef200aeb3ea (patch) | |
tree | 149593ed16cd54a47743d29f0123812dc10f96c3 /chrome/app | |
parent | 6b4de6b36e8060902307a3e3da9f8693b0751c63 (diff) | |
download | chromium_src-c157279b239fe6ece8bab2ddcec43ef200aeb3ea.zip chromium_src-c157279b239fe6ece8bab2ddcec43ef200aeb3ea.tar.gz chromium_src-c157279b239fe6ece8bab2ddcec43ef200aeb3ea.tar.bz2 |
* Create the registry key needed for "dr" value if it doesn't exist.
BUG=1566745
Review URL: http://codereview.chromium.org/16553
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7621 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rwxr-xr-x | chrome/app/google_update_client.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/app/google_update_client.cc b/chrome/app/google_update_client.cc index 019c401..bbe216f 100755 --- a/chrome/app/google_update_client.cc +++ b/chrome/app/google_update_client.cc @@ -81,8 +81,9 @@ bool GoogleUpdateClient::Launch(HINSTANCE instance, std::wstring key_path(google_update::kRegPathClientState); key_path.append(L"\\" + guid_); HKEY reg_key; - if (::RegOpenKeyEx(HKEY_CURRENT_USER, key_path.c_str(), 0, - KEY_WRITE, ®_key) == ERROR_SUCCESS) { + if (::RegCreateKeyEx(HKEY_CURRENT_USER, key_path.c_str(), 0, NULL, + REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, + ®_key, NULL) == ERROR_SUCCESS) { const wchar_t kVal[] = L"1"; ::RegSetValueEx(reg_key, google_update::kRegDidRunField, 0, REG_SZ, reinterpret_cast<const BYTE *>(kVal), sizeof(kVal)); |