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

Side by Side Diff: chrome_elf/blacklist/blacklist.h

Issue 181373003: Link chrome_elf.dll instead of statically linking the blacklist code (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add header Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « chrome_elf/blacklist.gypi ('k') | chrome_elf/blacklist/blacklist.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #if defined(_WIN64) 8 #if defined(_WIN64)
9 #include "sandbox/win/src/sandbox_nt_types.h" 9 #include "sandbox/win/src/sandbox_nt_types.h"
10 #endif 10 #endif
11 11
12 namespace blacklist { 12 namespace blacklist {
13 13
14 // Max size of the DLL blacklist. 14 // Max size of the DLL blacklist.
15 const int kTroublesomeDllsMaxCount = 64; 15 const int kTroublesomeDllsMaxCount = 64;
16 16
17 // The DLL blacklist. 17 // The DLL blacklist.
18 extern const wchar_t* g_troublesome_dlls[kTroublesomeDllsMaxCount]; 18 extern const wchar_t* g_troublesome_dlls[kTroublesomeDllsMaxCount];
19 19
20 // The registry path of the blacklist beacon.
21 extern const wchar_t kRegistryBeaconPath[];
22
23 // The properties for the blacklist beacon.
24 extern const wchar_t kBeaconVersion[];
25 extern const wchar_t kBeaconState[];
26
27 // The states for the blacklist setup code.
28 enum BlacklistState {
29 BLACKLIST_DISABLED = 0,
30 BLACKLIST_ENABLED,
31 // The blacklist setup code is running. If this is still set at startup,
32 // it means the last setup crashed.
33 BLACKLIST_SETUP_RUNNING,
34 // The blacklist thunk setup code is running. If this is still set at startup,
35 // it means the last setup crashed during thunk setup.
36 BLACKLIST_THUNK_SETUP,
37 // The blacklist code is currently intercepting MapViewOfSection. If this is
38 // still set at startup, it means we crashed during interception.
39 BLACKLIST_INTERCEPTING,
40 // Always keep this at the end.
41 BLACKLIST_STATE_MAX,
42 };
43
44 #if defined(_WIN64) 20 #if defined(_WIN64)
45 extern NtMapViewOfSectionFunction g_nt_map_view_of_section_func; 21 extern NtMapViewOfSectionFunction g_nt_map_view_of_section_func;
46 #endif 22 #endif
47 23
48 // Attempts to leave a beacon in the current user's registry hive. 24 // Attempts to leave a beacon in the current user's registry hive.
49 // If the blacklist beacon doesn't say it is enabled or there are any other 25 // If the blacklist beacon doesn't say it is enabled or there are any other
50 // errors when creating the beacon, returns false. Otherwise returns true. 26 // errors when creating the beacon, returns false. Otherwise returns true.
51 // The intent of the beacon is to act as an extra failure mode protection 27 // The intent of the beacon is to act as an extra failure mode protection
52 // whereby if Chrome for some reason fails to start during blacklist setup, 28 // whereby if Chrome for some reason fails to start during blacklist setup,
53 // it will skip blacklisting on the subsequent run. 29 // it will skip blacklisting on the subsequent run.
(...skipping 22 matching lines...) Expand all
76 52
77 // Initializes the DLL blacklist in the current process. This should be called 53 // Initializes the DLL blacklist in the current process. This should be called
78 // before any undesirable DLLs might be loaded. If |force| is set to true, then 54 // before any undesirable DLLs might be loaded. If |force| is set to true, then
79 // initialization will take place even if a beacon is present. This is useful 55 // initialization will take place even if a beacon is present. This is useful
80 // for tests. 56 // for tests.
81 bool Initialize(bool force); 57 bool Initialize(bool force);
82 58
83 } // namespace blacklist 59 } // namespace blacklist
84 60
85 #endif // CHROME_ELF_BLACKLIST_BLACKLIST_H_ 61 #endif // CHROME_ELF_BLACKLIST_BLACKLIST_H_
OLDNEW
« no previous file with comments | « chrome_elf/blacklist.gypi ('k') | chrome_elf/blacklist/blacklist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698