OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chrome_elf_init_win.h" | 5 #include "chrome/browser/chrome_elf_init_win.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 const char kBrowserBlacklistTrialEnabledGroupName[] = "Enabled"; | 22 const char kBrowserBlacklistTrialEnabledGroupName[] = "Enabled"; |
23 | 23 |
24 class ChromeBlacklistTrialTest : public testing::Test { | 24 class ChromeBlacklistTrialTest : public testing::Test { |
25 protected: | 25 protected: |
26 ChromeBlacklistTrialTest() {} | 26 ChromeBlacklistTrialTest() {} |
27 virtual ~ChromeBlacklistTrialTest() {} | 27 virtual ~ChromeBlacklistTrialTest() {} |
28 | 28 |
29 virtual void SetUp() OVERRIDE { | 29 virtual void SetUp() OVERRIDE { |
30 testing::Test::SetUp(); | 30 testing::Test::SetUp(); |
31 | 31 |
32 override_manager_.OverrideRegistry(HKEY_CURRENT_USER, | 32 override_manager_.OverrideRegistry(HKEY_CURRENT_USER); |
33 L"browser_blacklist_test"); | |
34 | 33 |
35 blacklist_registry_key_.reset( | 34 blacklist_registry_key_.reset( |
36 new base::win::RegKey(HKEY_CURRENT_USER, | 35 new base::win::RegKey(HKEY_CURRENT_USER, |
37 blacklist::kRegistryBeaconPath, | 36 blacklist::kRegistryBeaconPath, |
38 KEY_QUERY_VALUE | KEY_SET_VALUE)); | 37 KEY_QUERY_VALUE | KEY_SET_VALUE)); |
39 } | 38 } |
40 | 39 |
41 DWORD GetBlacklistState() { | 40 DWORD GetBlacklistState() { |
42 DWORD blacklist_state = blacklist::BLACKLIST_STATE_MAX; | 41 DWORD blacklist_state = blacklist::BLACKLIST_STATE_MAX; |
43 blacklist_registry_key_->ReadValueDW(blacklist::kBeaconState, | 42 blacklist_registry_key_->ReadValueDW(blacklist::kBeaconState, |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 187 |
189 for (std::map<std::string, std::string>::iterator it = desired_params.begin(); | 188 for (std::map<std::string, std::string>::iterator it = desired_params.begin(); |
190 it != desired_params.end(); | 189 it != desired_params.end(); |
191 ++it) { | 190 ++it) { |
192 std::wstring name = base::UTF8ToWide(it->first); | 191 std::wstring name = base::UTF8ToWide(it->first); |
193 ASSERT_TRUE(finch_blacklist_registry_key.HasValue(name.c_str())); | 192 ASSERT_TRUE(finch_blacklist_registry_key.HasValue(name.c_str())); |
194 } | 193 } |
195 } | 194 } |
196 | 195 |
197 } // namespace | 196 } // namespace |
OLD | NEW |