Chromium Code Reviews| Index: chrome/installer/util/google_update_settings.cc |
| diff --git a/chrome/installer/util/google_update_settings.cc b/chrome/installer/util/google_update_settings.cc |
| index feac280afb50d454c4e4530bb0af129b95af1f52..18fdea4d70b7769ceddb7bf9150eca7d87d64ade 100644 |
| --- a/chrome/installer/util/google_update_settings.cc |
| +++ b/chrome/installer/util/google_update_settings.cc |
| @@ -89,7 +89,8 @@ bool WriteGoogleUpdateStrKeyInternal(const AppRegistrationData& app_reg_data, |
| base::string16 reg_path(app_reg_data.GetStateMediumKey()); |
| reg_path.append(L"\\"); |
| reg_path.append(name); |
| - RegKey key(HKEY_LOCAL_MACHINE, reg_path.c_str(), KEY_SET_VALUE); |
| + RegKey key( |
| + HKEY_LOCAL_MACHINE, reg_path.c_str(), KEY_SET_VALUE | KEY_WOW64_32KEY); |
| key.WriteValue(google_update::kRegAggregateMethod, aggregate); |
| return (key.WriteValue(uniquename.c_str(), value.c_str()) == ERROR_SUCCESS); |
| } else { |
| @@ -231,7 +232,7 @@ bool GoogleUpdateSettings::GetCollectStatsConsentAtLevel(bool system_install) { |
| have_value = |
| system_install && |
| key.Open(HKEY_LOCAL_MACHINE, dist->GetStateMediumKey().c_str(), |
| - KEY_QUERY_VALUE) == ERROR_SUCCESS && |
| + KEY_QUERY_VALUE | KEY_WOW64_32KEY) == ERROR_SUCCESS && |
|
grt (UTC plus 2)
2014/06/04 17:20:05
i like
const REGSAM kAccess = KEY_QUERY_VALUE |
Will Harris
2014/06/04 17:48:07
Done.
|
| key.ReadValueDW(google_update::kRegUsageStatsField, |
| &value) == ERROR_SUCCESS; |
| @@ -240,7 +241,7 @@ bool GoogleUpdateSettings::GetCollectStatsConsentAtLevel(bool system_install) { |
| have_value = |
| key.Open(system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, |
| dist->GetStateKey().c_str(), |
| - KEY_QUERY_VALUE) == ERROR_SUCCESS && |
| + KEY_QUERY_VALUE | KEY_WOW64_32KEY) == ERROR_SUCCESS && |
| key.ReadValueDW(google_update::kRegUsageStatsField, |
| &value) == ERROR_SUCCESS; |
| } |
| @@ -271,7 +272,8 @@ bool GoogleUpdateSettings::SetCollectStatsConsentAtLevel(bool system_install, |
| std::wstring reg_path = |
| system_install ? dist->GetStateMediumKey() : dist->GetStateKey(); |
| RegKey key; |
| - LONG result = key.Create(root_key, reg_path.c_str(), KEY_SET_VALUE); |
| + LONG result = key.Create( |
| + root_key, reg_path.c_str(), KEY_SET_VALUE | KEY_WOW64_32KEY); |
| if (result != ERROR_SUCCESS) { |
| LOG(ERROR) << "Failed opening key " << reg_path << " to set " |
| << google_update::kRegUsageStatsField << "; result: " << result; |
| @@ -308,8 +310,9 @@ bool GoogleUpdateSettings::SetEULAConsent( |
| RegKey key; |
| // Write the consent value into the product's ClientStateMedium key. |
| - if (key.Create(HKEY_LOCAL_MACHINE, reg_path.c_str(), |
| - KEY_SET_VALUE) != ERROR_SUCCESS || |
| + if (key.Create(HKEY_LOCAL_MACHINE, |
| + reg_path.c_str(), |
| + KEY_SET_VALUE | KEY_WOW64_32KEY) != ERROR_SUCCESS || |
|
grt (UTC plus 2)
2014/06/04 17:20:05
local const for this function, too?
Will Harris
2014/06/04 17:48:07
Done.
|
| key.WriteValue(google_update::kRegEULAAceptedField, |
| eula_accepted) != ERROR_SUCCESS) { |
| succeeded = false; |
| @@ -325,7 +328,7 @@ bool GoogleUpdateSettings::SetEULAConsent( |
| BrowserDistribution::CHROME_BINARIES); |
| reg_path = dist->GetStateMediumKey(); |
| if (key.Create(HKEY_LOCAL_MACHINE, reg_path.c_str(), |
| - KEY_SET_VALUE) != ERROR_SUCCESS || |
| + KEY_SET_VALUE | KEY_WOW64_32KEY) != ERROR_SUCCESS || |
| key.WriteValue(google_update::kRegEULAAceptedField, |
| eula_accepted) != ERROR_SUCCESS) { |
| succeeded = false; |