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

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

Issue 311893005: Can now adjust the number of retries before the blacklist is disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made csharp's changes. Created 6 years, 6 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
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 size_t kTroublesomeDllsMaxCount = 64; 15 const size_t 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 #if defined(_WIN64) 20 #if defined(_WIN64)
21 extern NtMapViewOfSectionFunction g_nt_map_view_of_section_func; 21 extern NtMapViewOfSectionFunction g_nt_map_view_of_section_func;
22 #endif 22 #endif
23 23
24 // Attempts to leave a beacon in the current user's registry hive. 24 // Helper for LeaveSetupBeacon. Checks the current state of the beacon and
25 // If the blacklist beacon doesn't say it is enabled or there are any other 25 // modifies the beacon and attempt counter accordingly.
26 // errors when creating the beacon, returns false. Otherwise returns true. 26 bool HandlePreviousBeacon();
csharp 2014/06/11 13:34:43 This probably doesn't need to be declared here sin
krstnmnlsn 2014/06/11 16:35:27 Done.
27 // The intent of the beacon is to act as an extra failure mode protection 27
28 // whereby if Chrome for some reason fails to start during blacklist setup, 28 // Attempts to leave a beacon in the current user's registry hive. If the
29 // it will skip blacklisting on the subsequent run. 29 // blacklist beacon doesn't say it is enabled or there are any other errors when
30 // creating the beacon, returns false. Otherwise returns true. The intent of the
31 // beacon is to act as an extra failure mode protection whereby if Chrome for
csharp 2014/06/11 13:34:43 nit: remove "for some reason"
krstnmnlsn 2014/06/11 16:35:27 Done.
32 // some reason repeatedly fails to start during blacklist setup, it will skip
33 // blacklisting on the subsequent run.
30 bool LeaveSetupBeacon(); 34 bool LeaveSetupBeacon();
31 35
32 // Looks for the beacon that LeaveSetupBeacon() creates and resets it to 36 // Looks for the setup running beacon that LeaveSetupBeacon() creates and resets
33 // to show the setup was successful. 37 // it to to show the setup was successful.
34 // Returns true if the beacon was successfully set to BLACKLIST_ENABLED. 38 // Returns true if the beacon was successfully set to BLACKLIST_ENABLED.
35 bool ResetBeacon(); 39 bool ResetBeacon();
36 40
37 // Return the size of the current blacklist. 41 // Return the size of the current blacklist.
38 int BlacklistSize(); 42 int BlacklistSize();
39 43
40 // Returns if true if the blacklist has been initialized. 44 // Returns if true if the blacklist has been initialized.
41 extern "C" bool IsBlacklistInitialized(); 45 extern "C" bool IsBlacklistInitialized();
42 46
43 // Adds the given dll name to the blacklist. Returns true if the dll name is in 47 // Adds the given dll name to the blacklist. Returns true if the dll name is in
(...skipping 21 matching lines...) Expand all
65 69
66 // Initializes the DLL blacklist in the current process. This should be called 70 // Initializes the DLL blacklist in the current process. This should be called
67 // before any undesirable DLLs might be loaded. If |force| is set to true, then 71 // before any undesirable DLLs might be loaded. If |force| is set to true, then
68 // initialization will take place even if a beacon is present. This is useful 72 // initialization will take place even if a beacon is present. This is useful
69 // for tests. 73 // for tests.
70 bool Initialize(bool force); 74 bool Initialize(bool force);
71 75
72 } // namespace blacklist 76 } // namespace blacklist
73 77
74 #endif // CHROME_ELF_BLACKLIST_BLACKLIST_H_ 78 #endif // CHROME_ELF_BLACKLIST_BLACKLIST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698