| Index: chrome_elf/blacklist/blacklist.h
|
| diff --git a/chrome_elf/blacklist/blacklist.h b/chrome_elf/blacklist/blacklist.h
|
| index 779525f5bccb52c48f389cb1806bae5620672213..9877c2930cc02ad2319e86824635f5d609aa69bb 100644
|
| --- a/chrome_elf/blacklist/blacklist.h
|
| +++ b/chrome_elf/blacklist/blacklist.h
|
| @@ -12,7 +12,7 @@
|
| namespace blacklist {
|
|
|
| // Max size of the DLL blacklist.
|
| -const int kTroublesomeDllsMaxCount = 64;
|
| +const size_t kTroublesomeDllsMaxCount = 64;
|
|
|
| // The DLL blacklist.
|
| extern const wchar_t* g_troublesome_dlls[kTroublesomeDllsMaxCount];
|
| @@ -44,12 +44,25 @@ extern "C" bool IsBlacklistInitialized();
|
| // 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
|
| // using RemoveDllFromBlacklist.
|
| +// Exposed for testing only, this shouldn't be exported from chrome_elf.dll.
|
| extern "C" bool AddDllToBlacklist(const wchar_t* dll_name);
|
|
|
| // Removes the given dll name from the blacklist. Returns true if it was
|
| // removed, false on error.
|
| +// Exposed for testing only, this shouldn't be exported from chrome_elf.dll.
|
| extern "C" bool RemoveDllFromBlacklist(const wchar_t* dll_name);
|
|
|
| +// Returns a list of all the dlls that have been successfully blocked by the
|
| +// blacklist via blocked_dlls, if there is enough space (according to |size|).
|
| +// |size| will always be modified to be the number of dlls that were blocked.
|
| +// The caller doesn't own the strings and isn't expected to free them. These
|
| +// strings won't be hanging unless RemoveDllFromBlacklist is called, but it
|
| +// is only exposed in tests (and should stay that way).
|
| +extern "C" void SuccessfullyBlocked(const wchar_t** blocked_dlls, int* size);
|
| +
|
| +// Record that the dll at the given index was blocked.
|
| +void BlockedDll(size_t blocked_index);
|
| +
|
| // Initializes the DLL blacklist in the current process. This should be called
|
| // before any undesirable DLLs might be loaded. If |force| is set to true, then
|
| // initialization will take place even if a beacon is present. This is useful
|
|
|