Chromium Code Reviews| Index: chrome_elf/blacklist/blacklist.h |
| diff --git a/chrome_elf/blacklist/blacklist.h b/chrome_elf/blacklist/blacklist.h |
| index 2e21f20793e296cfff766cd3728cf6238f9fe154..1530ae00dc917e5c2a14b83879733fa1b4ae6caa 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]; |
| @@ -68,12 +68,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); |
|
sky
2014/02/26 21:52:05
Is there a reason this can't return std::vector<st
csharp
2014/02/26 22:00:01
This is usually called from across a dll boundary
|
| + |
| +// 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 |