Commit a41f8d47 authored by amit@chromium.org's avatar amit@chromium.org

Fix a bug introduced by RegKey change and corresponding unit test.

BUG=70092
TEST=GoogleUpdateTest.StatsConsent

Review URL: http://codereview.chromium.org/6339005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71913 0039d316-1c4b-4281-b951-d872f2087c98
parent 7fea5a45
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
class GoogleUpdateTest : public PlatformTest { class GoogleUpdateTest : public PlatformTest {
}; };
// bug: http://crbug.com/70092 TEST_F(GoogleUpdateTest, StatsConsent) {
TEST_F(GoogleUpdateTest, DISABLED_StatsConstent) {
// Stats are off by default. // Stats are off by default.
EXPECT_FALSE(GoogleUpdateSettings::GetCollectStatsConsent()); EXPECT_FALSE(GoogleUpdateSettings::GetCollectStatsConsent());
// Stats reporting is ON. // Stats reporting is ON.
......
...@@ -112,7 +112,7 @@ bool GoogleUpdateSettings::SetCollectStatsConsent(bool consented) { ...@@ -112,7 +112,7 @@ bool GoogleUpdateSettings::SetCollectStatsConsent(bool consented) {
key.WriteValue(google_update::kRegUsageStatsField, value); key.WriteValue(google_update::kRegUsageStatsField, value);
// Writing to HKCU is used both by chrome and by the crash reporter. // Writing to HKCU is used both by chrome and by the crash reporter.
reg_path = dist->GetStateKey(); reg_path = dist->GetStateKey();
key.Open(HKEY_CURRENT_USER, reg_path.c_str(), KEY_READ | KEY_WRITE); key.Create(HKEY_CURRENT_USER, reg_path.c_str(), KEY_READ | KEY_WRITE);
return (key.WriteValue(google_update::kRegUsageStatsField, value) == return (key.WriteValue(google_update::kRegUsageStatsField, value) ==
ERROR_SUCCESS); ERROR_SUCCESS);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment