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

Unified Diff: trunk/src/chrome_elf/blacklist/blacklist.cc

Issue 164833002: Revert 251095 "Revert 250828 "Add a UMA stat to track if the Bro..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 10 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 | « trunk/src/chrome_elf/blacklist/blacklist.h ('k') | trunk/src/chrome_elf/blacklist/test/blacklist_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chrome_elf/blacklist/blacklist.cc
===================================================================
--- trunk/src/chrome_elf/blacklist/blacklist.cc (revision 251130)
+++ trunk/src/chrome_elf/blacklist/blacklist.cc (working copy)
@@ -60,6 +60,10 @@
WOW64_UNKNOWN,
};
+// Record if the blacklist was successfully initialized so processes can easily
+// determine if the blacklist is enabled for them.
+bool g_blacklist_initialized = false;
+
WOW64Status GetWOW64StatusForCurrentProcess() {
typedef BOOL (WINAPI* IsWow64ProcessFunc)(HANDLE, PBOOL);
IsWow64ProcessFunc is_wow64_process = reinterpret_cast<IsWow64ProcessFunc>(
@@ -272,6 +276,10 @@
return size;
}
+bool IsBlacklistInitialized() {
+ return g_blacklist_initialized;
+}
+
bool AddDllToBlacklist(const wchar_t* dll_name) {
int blacklist_size = BlacklistSize();
// We need to leave one space at the end for the null pointer.
@@ -373,6 +381,9 @@
}
#endif
+ // Record that we have initialized the blacklist.
+ g_blacklist_initialized = true;
+
BYTE* thunk_storage = reinterpret_cast<BYTE*>(&g_thunk_storage);
// Mark the thunk storage as readable and writeable, since we
« no previous file with comments | « trunk/src/chrome_elf/blacklist/blacklist.h ('k') | trunk/src/chrome_elf/blacklist/test/blacklist_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698