- } else if (blacklist_state == blacklist::BLACKLIST_SETUP_RUNNING) {
- RecordBlacklistSetupEvent(BLACKLIST_SETUP_FAILED);
-
- // Since the setup failed, mark the blacklist as disabled so we don't
- // try it again for this version.
- blacklist_registry_key.WriteValue(blacklist::kBeaconState,
- blacklist::BLACKLIST_DISABLED);
+ } else {
+ switch (blacklist_state) {
+ case blacklist::BLACKLIST_SETUP_RUNNING:
+ RecordBlacklistSetupEvent(BLACKLIST_SETUP_FAILED);
+ break;
+ case blacklist::BLACKLIST_THUNK_SETUP:
+ RecordBlacklistSetupEvent(BLACKLIST_THUNK_SETUP_FAILED);
+ break;
+ case blacklist::BLACKLIST_INTERCEPTING:
+ RecordBlacklistSetupEvent(BLACKLIST_INTERCEPTION_FAILED);
+ break;
+ }
+
+ // Since some part of the blacklist failed, ensure it is now disabled
+ // for this version.
+ if (blacklist_state != blacklist::BLACKLIST_DISABLED) {
+ blacklist_registry_key.WriteValue(blacklist::kBeaconState,
+ blacklist::BLACKLIST_DISABLED);
+ }