| Index: chrome/browser/chrome_elf_init_win.cc
|
| diff --git a/chrome/browser/chrome_elf_init_win.cc b/chrome/browser/chrome_elf_init_win.cc
|
| index 042f3d1a4063383134df0cf06f5f238598af6837..e09d2c9c3928a28657f54831bcb777657fa13c1d 100644
|
| --- a/chrome/browser/chrome_elf_init_win.cc
|
| +++ b/chrome/browser/chrome_elf_init_win.cc
|
| @@ -12,6 +12,7 @@
|
| #include "chrome_elf/blacklist/blacklist.h"
|
| #include "chrome_elf/chrome_elf_constants.h"
|
| #include "chrome_elf/dll_hash/dll_hash.h"
|
| +#include "components/variations/variations_associated_data.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "version.h" // NOLINT
|
|
|
| @@ -87,6 +88,7 @@ void InitializeChromeElf() {
|
| base::win::RegKey blacklist_registry_key(HKEY_CURRENT_USER);
|
| blacklist_registry_key.DeleteKey(blacklist::kRegistryBeaconPath);
|
| } else {
|
| + AddFinchBlacklistToRegistry();
|
| BrowserBlacklistBeaconSetup();
|
| }
|
|
|
| @@ -103,6 +105,27 @@ void InitializeChromeElf() {
|
| base::TimeDelta::FromSeconds(kBlacklistReportingDelaySec));
|
| }
|
|
|
| +void AddFinchBlacklistToRegistry() {
|
| + base::win::RegKey finch_blacklist_registry_key(
|
| + HKEY_CURRENT_USER, blacklist::kRegistryFinchListPath, KEY_SET_VALUE);
|
| +
|
| + // No point in trying to continue if the registry key isn't valid.
|
| + if (!finch_blacklist_registry_key.Valid())
|
| + return;
|
| +
|
| + std::map<std::string, std::string> params;
|
| + chrome_variations::GetVariationParams(kBrowserBlacklistTrialName, ¶ms);
|
| +
|
| + for (std::map<std::string, std::string>::iterator it = params.begin();
|
| + it != params.end();
|
| + ++it) {
|
| + std::wstring name = base::UTF8ToWide(it->first);
|
| + std::wstring val = base::UTF8ToWide(it->second);
|
| +
|
| + finch_blacklist_registry_key.WriteValue(name.c_str(), val.c_str());
|
| + }
|
| +}
|
| +
|
| void BrowserBlacklistBeaconSetup() {
|
| base::win::RegKey blacklist_registry_key(HKEY_CURRENT_USER,
|
| blacklist::kRegistryBeaconPath,
|
|
|