OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 BASE_TRACE_EVENT_MEMORY_INFRA_BACKGROUND_WHITELIST_H_ |
| 6 #define BASE_TRACE_EVENT_MEMORY_INFRA_BACKGROUND_WHITELIST_H_ |
| 7 |
| 8 // This file contains the whitelists for background mode to limit the tracing |
| 9 // overhead and remove sensitive information from traces. |
| 10 |
| 11 #include <string> |
| 12 |
| 13 #include "base/base_export.h" |
| 14 |
| 15 namespace base { |
| 16 namespace trace_event { |
| 17 |
| 18 // Checks if the given |mdp_name| is in the whitelist. |
| 19 bool BASE_EXPORT IsMemoryDumpProviderWhitelisted(const char* mdp_name); |
| 20 |
| 21 // Checks if the given |name| matches any of the whitelisted patterns. |
| 22 bool BASE_EXPORT IsMemoryAllocatorDumpNameWhitelisted(const std::string& name); |
| 23 |
| 24 // The whitelist is replaced with the given list for tests. The last element of |
| 25 // the list must be nullptr. |
| 26 void BASE_EXPORT SetDumpProviderWhitelistForTesting(const char* const* list); |
| 27 void BASE_EXPORT |
| 28 SetAllocatorDumpNameWhitelistForTesting(const char* const* list); |
| 29 |
| 30 } // namespace trace_event |
| 31 } // namespace base |
| 32 |
| 33 #endif // BASE_TRACE_EVENT_MEMORY_INFRA_BACKGROUND_WHITELIST_H_ |
OLD | NEW |