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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/metrics/field_trial.h" | 6 #include "base/metrics/field_trial.h" |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/metrics/sparse_histogram.h" | 8 #include "base/metrics/sparse_histogram.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/win/registry.h" | 10 #include "base/win/registry.h" |
11 #include "chrome/browser/chrome_elf_init_win.h" | 11 #include "chrome/browser/chrome_elf_init_win.h" |
12 #include "chrome/common/chrome_version.h" | |
13 #include "chrome_elf/blacklist/blacklist.h" | 12 #include "chrome_elf/blacklist/blacklist.h" |
14 #include "chrome_elf/chrome_elf_constants.h" | 13 #include "chrome_elf/chrome_elf_constants.h" |
15 #include "chrome_elf/dll_hash/dll_hash.h" | 14 #include "chrome_elf/dll_hash/dll_hash.h" |
16 #include "components/variations/variations_associated_data.h" | 15 #include "components/variations/variations_associated_data.h" |
17 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
| 17 #include "version.h" // NOLINT |
18 | 18 |
19 const char kBrowserBlacklistTrialName[] = "BrowserBlacklist"; | 19 const char kBrowserBlacklistTrialName[] = "BrowserBlacklist"; |
20 const char kBrowserBlacklistTrialDisabledGroupName[] = "NoBlacklist"; | 20 const char kBrowserBlacklistTrialDisabledGroupName[] = "NoBlacklist"; |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 // How long to wait, in seconds, before reporting for the second (and last | 24 // How long to wait, in seconds, before reporting for the second (and last |
25 // time), what dlls were blocked from the browser process. | 25 // time), what dlls were blocked from the browser process. |
26 const int kBlacklistReportingDelaySec = 600; | 26 const int kBlacklistReportingDelaySec = 600; |
27 | 27 |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 197 |
198 blacklist_registry_key.WriteValue(blacklist::kBeaconAttemptCount, | 198 blacklist_registry_key.WriteValue(blacklist::kBeaconAttemptCount, |
199 static_cast<DWORD>(0)); | 199 static_cast<DWORD>(0)); |
200 | 200 |
201 // Only report the blacklist as getting setup when both registry writes | 201 // Only report the blacklist as getting setup when both registry writes |
202 // succeed, since otherwise the blacklist wasn't properly setup. | 202 // succeed, since otherwise the blacklist wasn't properly setup. |
203 if (set_version == ERROR_SUCCESS && set_state == ERROR_SUCCESS) | 203 if (set_version == ERROR_SUCCESS && set_state == ERROR_SUCCESS) |
204 RecordBlacklistSetupEvent(BLACKLIST_SETUP_ENABLED); | 204 RecordBlacklistSetupEvent(BLACKLIST_SETUP_ENABLED); |
205 } | 205 } |
206 } | 206 } |
OLD | NEW |