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

Unified Diff: chrome_elf/blacklist/blacklist.h

Issue 133923002: Use a Finch Experiment to control the Browser Blacklist (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix unittests Created 6 years, 11 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 | « chrome_elf/blacklist.gypi ('k') | chrome_elf/blacklist/blacklist.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_elf/blacklist/blacklist.h
diff --git a/chrome_elf/blacklist/blacklist.h b/chrome_elf/blacklist/blacklist.h
index 5787ddd1421315bf7deeeac7c614a4ad29310b34..08ca572c273376a27b17a8c744f23399d104304a 100644
--- a/chrome_elf/blacklist/blacklist.h
+++ b/chrome_elf/blacklist/blacklist.h
@@ -16,20 +16,36 @@ extern const wchar_t* g_troublesome_dlls[kTroublesomeDllsMaxCount];
// Cursor to the current last element in the blacklist.
extern int g_troublesome_dlls_cur_index;
-// The registry path of the blacklist beacon. Exposed here for testing.
+// The registry path of the blacklist beacon.
extern const wchar_t kRegistryBeaconPath[];
-// Attempts to create a beacon in the current user's registry hive.
-// If the beacon already exists or any other error occurs when creating the
-// beacon, returns false. Otherwise returns true.
+// The properties for the blacklist beacon.
+extern const wchar_t kBeaconVersion[];
+extern const wchar_t kBeaconState[];
+
+// The states for the blacklist setup code.
+enum BlacklistState {
+ BLACKLIST_DISABLED = 0,
+ BLACKLIST_ENABLED,
+ // The blacklist setup code is running. If this is still set at startup,
+ // it means the last setup crashed.
+ BLACKLIST_SETUP_RUNNING,
+ // Always keep this at the end.
+ BLACKLIST_STATE_MAX,
+};
+
+// Attempts to leave a beacon in the current user's registry hive.
+// If the blacklist beacon doesn't say it is enabled or there are any other
+// errors when creating the beacon, returns false. Otherwise returns true.
// The intent of the beacon is to act as an extra failure mode protection
// whereby if Chrome for some reason fails to start during blacklist setup,
// it will skip blacklisting on the subsequent run.
-bool CreateBeacon();
+bool LeaveSetupBeacon();
-// Looks for the beacon that CreateBeacon() creates and attempts to delete it.
-// Returns true if the beacon was found and deleted.
-bool ClearBeacon();
+// Looks for the beacon that LeaveSetupBeacon() creates and resets it to
+// to show the setup was successful.
+// Returns true if the beacon was successfully set to BLACKLIST_ENABLED.
+bool ResetBeacon();
// Adds the given dll name to the blacklist. Returns true if the dll name is in
// the blacklist when this returns, false on error. Note that this will copy
« no previous file with comments | « chrome_elf/blacklist.gypi ('k') | chrome_elf/blacklist/blacklist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698