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

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

Issue 107663008: Chrome browser process DLL blacklist. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Greg's feedback. Created 7 years 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_ELF_BLACKLIST_BLACKLIST_H_
6 #define CHROME_ELF_BLACKLIST_BLACKLIST_H_
7
8 namespace blacklist {
9
10 // Max size of the DLL blacklist.
11 const int kTroublesomeDllsMaxCount = 64;
12
13 // The DLL blacklist.
14 extern const wchar_t* g_troublesome_dlls[kTroublesomeDllsMaxCount];
15
16 // Cursor to the current last element in the blacklist.
17 extern int g_troublesome_dlls_cur_index;
18
19 // The registry path of the blacklist beacon. Exposed here for testing.
20 extern const wchar_t kRegistryBeaconPath[];
21
22 // Attempt to create a beacon in the current user's registry hive.
rvargas (doing something else) 2013/12/17 22:09:27 nit: Attempts
robertshield 2013/12/18 02:34:43 Done.
23 // If the beacon already exists or any other error occurs when creating the
24 // beacon, return false. Otherwise return true.
rvargas (doing something else) 2013/12/17 22:09:27 nit: returns
robertshield 2013/12/18 02:34:43 Done.
25 // The intent of the beacon is to act as an extra failure mode protection
26 // whereby if Chrome for some reason fails to start during blacklist setup,
27 // it will skip blacklisting on the subsequent run.
28 bool CreateBeacon();
29
30 // Looks for the beacon that CreateBeacon() creates and attempts to delete it.
31 // Returns true if the beacon was found and deleted.
32 bool ClearBeacon();
33
34 // Adds the given dll name to the blacklist. Returns true if the dll name is in
35 // the blacklist when this returns, false on error. Note that this will copy
36 // |dll_name| and will leak it on exit if the string is not subsequently removed
37 // using RemoveDllFromBlacklist.
38 extern "C" bool AddDllToBlacklist(const wchar_t* dll_name);
39
40 // Removes the given dll name from the blacklist. Returns true if it was
41 // removed, false on error.
42 extern "C" bool RemoveDllFromBlacklist(const wchar_t* dll_name);
43
44 // Initialize the DLL blacklist in the current process. This should be called
rvargas (doing something else) 2013/12/17 22:09:27 nit: initializes
robertshield 2013/12/18 02:34:43 Done.
45 // before any undesirable DLLs might be loaded. If |force| is set to true, then
46 // initialization will take place even if a beacon is present. This is useful
47 // for tests.
48 bool Initialize(bool force);
49
50 } // namespace blacklist
51
52 #endif // CHROME_ELF_BLACKLIST_BLACKLIST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698