Chromium Code Reviews| 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..b5c78bedf7c88be13ecad84b0ee4997a399d790f 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,26 @@ 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); |
| + |
| + std::map<std::string, std::string>::iterator it = params.begin(); |
|
csharp
2014/06/04 17:12:56
Move this into the for loop (line 120)
krstnmnlsn
2014/06/04 18:12:00
Done.
|
| + for (; 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, |