Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_ELF_BLACKLIST_BLACKLIST_H_ | 5 #ifndef CHROME_ELF_BLACKLIST_BLACKLIST_H_ |
| 6 #define CHROME_ELF_BLACKLIST_BLACKLIST_H_ | 6 #define CHROME_ELF_BLACKLIST_BLACKLIST_H_ |
| 7 | 7 |
| 8 namespace blacklist { | 8 namespace blacklist { |
| 9 | 9 |
| 10 // Max size of the DLL blacklist. | 10 // Max size of the DLL blacklist. |
| 11 const int kTroublesomeDllsMaxCount = 64; | 11 const int kTroublesomeDllsMaxCount = 64; |
| 12 | 12 |
| 13 // The DLL blacklist. | 13 // The DLL blacklist. |
| 14 extern const wchar_t* g_troublesome_dlls[kTroublesomeDllsMaxCount]; | 14 extern const wchar_t* g_troublesome_dlls[kTroublesomeDllsMaxCount]; |
| 15 | 15 |
| 16 // The registry path of the blacklist beacon. | 16 // The registry path of the blacklist beacon. |
| 17 extern const wchar_t kRegistryBeaconPath[]; | 17 extern const wchar_t kRegistryBeaconPath[]; |
| 18 | 18 |
| 19 // The properties for the blacklist beacon. | 19 // The properties for the blacklist beacon. |
| 20 extern const wchar_t kBeaconVersion[]; | 20 extern const wchar_t kBeaconVersion[]; |
| 21 extern const wchar_t kBeaconState[]; | 21 extern const wchar_t kBeaconState[]; |
| 22 | 22 |
| 23 // Record if the blacklist was patched in so processes can easily determine | |
|
robertshield
2014/02/06 18:55:23
s/patched in/successfully initialized/
csharp
2014/02/06 20:03:58
Done.
| |
| 24 // if the blacklist is enabled for them. | |
| 25 // TODO(csharp): Remove once we are sure the blacklist is only patching the | |
| 26 // browser process. | |
| 27 extern bool blacklist_patched; | |
| 28 | |
| 23 // The states for the blacklist setup code. | 29 // The states for the blacklist setup code. |
| 24 enum BlacklistState { | 30 enum BlacklistState { |
| 25 BLACKLIST_DISABLED = 0, | 31 BLACKLIST_DISABLED = 0, |
| 26 BLACKLIST_ENABLED, | 32 BLACKLIST_ENABLED, |
| 27 // The blacklist setup code is running. If this is still set at startup, | 33 // The blacklist setup code is running. If this is still set at startup, |
| 28 // it means the last setup crashed. | 34 // it means the last setup crashed. |
| 29 BLACKLIST_SETUP_RUNNING, | 35 BLACKLIST_SETUP_RUNNING, |
| 30 // Always keep this at the end. | 36 // Always keep this at the end. |
| 31 BLACKLIST_STATE_MAX, | 37 BLACKLIST_STATE_MAX, |
| 32 }; | 38 }; |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 59 | 65 |
| 60 // Initializes the DLL blacklist in the current process. This should be called | 66 // Initializes the DLL blacklist in the current process. This should be called |
| 61 // before any undesirable DLLs might be loaded. If |force| is set to true, then | 67 // before any undesirable DLLs might be loaded. If |force| is set to true, then |
| 62 // initialization will take place even if a beacon is present. This is useful | 68 // initialization will take place even if a beacon is present. This is useful |
| 63 // for tests. | 69 // for tests. |
| 64 bool Initialize(bool force); | 70 bool Initialize(bool force); |
| 65 | 71 |
| 66 } // namespace blacklist | 72 } // namespace blacklist |
| 67 | 73 |
| 68 #endif // CHROME_ELF_BLACKLIST_BLACKLIST_H_ | 74 #endif // CHROME_ELF_BLACKLIST_BLACKLIST_H_ |
| OLD | NEW |