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

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

Issue 174013007: Add UMA stats to record when DLLs are successfully blocked in the Browser. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 10 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
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Adds the given dll name to the blacklist. Returns true if the dll name is in 67 // Adds the given dll name to the blacklist. Returns true if the dll name is in
68 // the blacklist when this returns, false on error. Note that this will copy 68 // the blacklist when this returns, false on error. Note that this will copy
69 // |dll_name| and will leak it on exit if the string is not subsequently removed 69 // |dll_name| and will leak it on exit if the string is not subsequently removed
70 // using RemoveDllFromBlacklist. 70 // using RemoveDllFromBlacklist.
71 extern "C" bool AddDllToBlacklist(const wchar_t* dll_name); 71 extern "C" bool AddDllToBlacklist(const wchar_t* dll_name);
72 72
73 // Removes the given dll name from the blacklist. Returns true if it was 73 // Removes the given dll name from the blacklist. Returns true if it was
74 // removed, false on error. 74 // removed, false on error.
75 extern "C" bool RemoveDllFromBlacklist(const wchar_t* dll_name); 75 extern "C" bool RemoveDllFromBlacklist(const wchar_t* dll_name);
76 76
77 // Returns a list of all the dlls that have been successfully blocked by the
78 // blacklist via blocked_dlls, if there is enough space (according to |size|).
79 // |size| will always be modify to be the number of dlls that were blocked.
robertshield 2014/02/24 15:24:05 be modified
csharp 2014/02/24 21:37:16 Done.
80 extern "C" void SuccessfullyBlocked(const wchar_t** blocked_dlls, int* size);
robertshield 2014/02/24 15:24:05 document the memory management specifics here, i.e
csharp 2014/02/24 21:37:16 Done.
81
82 // Record that the dll at the given index was blocked.
83 void BlockedDll(int blocked_index);
84
77 // Initializes the DLL blacklist in the current process. This should be called 85 // 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 86 // 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 87 // initialization will take place even if a beacon is present. This is useful
80 // for tests. 88 // for tests.
81 bool Initialize(bool force); 89 bool Initialize(bool force);
82 90
83 } // namespace blacklist 91 } // namespace blacklist
84 92
85 #endif // CHROME_ELF_BLACKLIST_BLACKLIST_H_ 93 #endif // CHROME_ELF_BLACKLIST_BLACKLIST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698