| 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" | 
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" | 
| 12 #include "base/test/test_reg_util_win.h" | 12 #include "base/test/test_reg_util_win.h" | 
| 13 #include "chrome/common/chrome_version_info.h" | 13 #include "chrome/common/chrome_version_info.h" | 
| 14 #include "chrome_elf/chrome_elf_constants.h" | 14 #include "chrome_elf/chrome_elf_constants.h" | 
| 15 #include "components/variations/entropy_provider.h" | 15 #include "components/variations/entropy_provider.h" | 
| 16 #include "components/variations/variations_associated_data.h" | 16 #include "components/variations/variations_associated_data.h" | 
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" | 
| 18 #include "version.h"  // NOLINT | 18 #include "version.h"  // NOLINT | 
| 19 | 19 | 
| 20 namespace { | 20 namespace { | 
| 21 | 21 | 
| 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   ~ChromeBlacklistTrialTest() override {} | 
| 28 | 28 | 
| 29   virtual void SetUp() override { | 29   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 | 33 | 
| 34     blacklist_registry_key_.reset( | 34     blacklist_registry_key_.reset( | 
| 35         new base::win::RegKey(HKEY_CURRENT_USER, | 35         new base::win::RegKey(HKEY_CURRENT_USER, | 
| 36                               blacklist::kRegistryBeaconPath, | 36                               blacklist::kRegistryBeaconPath, | 
| 37                               KEY_QUERY_VALUE | KEY_SET_VALUE)); | 37                               KEY_QUERY_VALUE | KEY_SET_VALUE)); | 
| 38   } | 38   } | 
| 39 | 39 | 
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 187 | 187 | 
| 188   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(); | 
| 189        it != desired_params.end(); | 189        it != desired_params.end(); | 
| 190        ++it) { | 190        ++it) { | 
| 191     std::wstring name = base::UTF8ToWide(it->first); | 191     std::wstring name = base::UTF8ToWide(it->first); | 
| 192     ASSERT_TRUE(finch_blacklist_registry_key.HasValue(name.c_str())); | 192     ASSERT_TRUE(finch_blacklist_registry_key.HasValue(name.c_str())); | 
| 193   } | 193   } | 
| 194 } | 194 } | 
| 195 | 195 | 
| 196 }  // namespace | 196 }  // namespace | 
| OLD | NEW | 
|---|