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

Unified Diff: chrome_elf/blacklist/blacklist.cc

Issue 140763008: Add a UMA stat to track if the Browser blacklist is Set on the Renderer (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update isolate files 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
Index: chrome_elf/blacklist/blacklist.cc
diff --git a/chrome_elf/blacklist/blacklist.cc b/chrome_elf/blacklist/blacklist.cc
index bf48435e3e0475d1780df5226baa27297359e2bc..1e9c6c473d89aae96a10862176848778a500e681 100644
--- a/chrome_elf/blacklist/blacklist.cc
+++ b/chrome_elf/blacklist/blacklist.cc
@@ -60,6 +60,10 @@ enum WOW64Status {
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>(
@@ -266,6 +270,10 @@ int BlacklistSize() {
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.
@@ -367,6 +375,9 @@ bool Initialize(bool force) {
}
#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

Powered by Google App Engine
This is Rietveld 408576698