Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome_elf / blacklist / blacklist.h
index 17a511d..2e21f20 100644 (file)
@@ -5,6 +5,10 @@
 #ifndef CHROME_ELF_BLACKLIST_BLACKLIST_H_
 #define CHROME_ELF_BLACKLIST_BLACKLIST_H_
 
+#if defined(_WIN64)
+#include "sandbox/win/src/sandbox_nt_types.h"
+#endif
+
 namespace blacklist {
 
 // Max size of the DLL blacklist.
@@ -27,10 +31,20 @@ enum BlacklistState {
   // The blacklist setup code is running. If this is still set at startup,
   // it means the last setup crashed.
   BLACKLIST_SETUP_RUNNING,
+  // The blacklist thunk setup code is running. If this is still set at startup,
+  // it means the last setup crashed during thunk setup.
+  BLACKLIST_THUNK_SETUP,
+  // The blacklist code is currently intercepting MapViewOfSection. If this is
+  // still set at startup, it means we crashed during interception.
+  BLACKLIST_INTERCEPTING,
   // Always keep this at the end.
   BLACKLIST_STATE_MAX,
 };
 
+#if defined(_WIN64)
+extern NtMapViewOfSectionFunction g_nt_map_view_of_section_func;
+#endif
+
 // 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.
@@ -47,6 +61,9 @@ bool ResetBeacon();
 // Return the size of the current blacklist.
 int BlacklistSize();
 
+// Returns if true if the blacklist has been initialized.
+extern "C" bool IsBlacklistInitialized();
+
 // 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
 // |dll_name| and will leak it on exit if the string is not subsequently removed