Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Unified Diff: chrome/browser/chrome_elf_init_win.cc

Issue 343613003: Report when blacklist.cc fails to setup the blacklisting thunk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c78ca17264a7a9addccf60b8b5bdb7a834a3d892..9be2d0a55674c021fb4be45d7ab5a8748241ac6f 100644
--- a/chrome/browser/chrome_elf_init_win.cc
+++ b/chrome/browser/chrome_elf_init_win.cc
@@ -40,7 +40,8 @@ enum BlacklistSetupEventType {
// The blacklist setup code failed to execute.
BLACKLIST_SETUP_FAILED,
- // Deprecated. The blacklist thunk setup code failed to execute.
+ // The blacklist thunk setup code failed. This is probably an indication
+ // that something else patched that code first.
BLACKLIST_THUNK_SETUP_FAILED,
// Deprecated. The blacklist interception code failed to execute.
@@ -143,9 +144,18 @@ void BrowserBlacklistBeaconSetup() {
blacklist_registry_key.ReadValueDW(blacklist::kBeaconState, &blacklist_state);
if (blacklist_state == blacklist::BLACKLIST_ENABLED) {
- // The blacklist was enabled successfully so we record the event (along with
- // the number of failed previous attempts).
- RecordBlacklistSetupEvent(BLACKLIST_SETUP_RAN_SUCCESSFULLY);
+ // The blacklist setup didn't crash, so we report if it was enabled or not.
+ if (blacklist::IsBlacklistInitialized()) {
+ RecordBlacklistSetupEvent(BLACKLIST_SETUP_RAN_SUCCESSFULLY);
+ } else {
+ // The only way for the blacklist to be enabled, but not fully
+ // initialized is if the thunk setup failed. See blacklist.cc
krstnmnlsn 2014/06/18 18:36:41 I guess my comment on line 196 of blacklist.cc is
csharp 2014/06/18 19:03:00 Correct, I updated blacklist.cc
+ // for more details.
+ RecordBlacklistSetupEvent(BLACKLIST_THUNK_SETUP_FAILED);
+ }
+
+ // Regardless of if the blacklist was fully enabled or not, report how many
+ // times we had to try to set it up.
DWORD attempt_count = 0;
blacklist_registry_key.ReadValueDW(blacklist::kBeaconAttemptCount,
&attempt_count);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698