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

Side by Side Diff: base/trace_event/memory_dump_request_args.h

Issue 2006943003: [tracing] Sanitize process memory dumps for background mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@whitelist_mdp
Patch Set: Fix stripping. Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 BASE_TRACE_EVENT_MEMORY_DUMP_REQUEST_ARGS_H_ 5 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_REQUEST_ARGS_H_
6 #define BASE_TRACE_EVENT_MEMORY_DUMP_REQUEST_ARGS_H_ 6 #define BASE_TRACE_EVENT_MEMORY_DUMP_REQUEST_ARGS_H_
7 7
8 // This file defines the types and structs used to issue memory dump requests. 8 // This file defines the types and structs used to issue memory dump requests.
9 // These are also used in the IPCs for coordinating inter-process memory dumps. 9 // These are also used in the IPCs for coordinating inter-process memory dumps.
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 struct BASE_EXPORT MemoryDumpRequestArgs { 53 struct BASE_EXPORT MemoryDumpRequestArgs {
54 // Globally unique identifier. In multi-process dumps, all processes issue a 54 // Globally unique identifier. In multi-process dumps, all processes issue a
55 // local dump with the same guid. This allows the trace importers to 55 // local dump with the same guid. This allows the trace importers to
56 // reconstruct the global dump. 56 // reconstruct the global dump.
57 uint64_t dump_guid; 57 uint64_t dump_guid;
58 58
59 MemoryDumpType dump_type; 59 MemoryDumpType dump_type;
60 MemoryDumpLevelOfDetail level_of_detail; 60 MemoryDumpLevelOfDetail level_of_detail;
61 }; 61 };
62 62
63 // Args for ProcessMemoryDump and passed to OnMemoryDump calls for memory dump
64 // providers. Dump providers are expected to read the args for creating dumps.
65 struct MemoryDumpArgs {
66 // Specifies how detailed the dumps should be.
67 MemoryDumpLevelOfDetail level_of_detail;
68 };
69
63 using MemoryDumpCallback = Callback<void(uint64_t dump_guid, bool success)>; 70 using MemoryDumpCallback = Callback<void(uint64_t dump_guid, bool success)>;
64 71
65 BASE_EXPORT const char* MemoryDumpTypeToString(const MemoryDumpType& dump_type); 72 BASE_EXPORT const char* MemoryDumpTypeToString(const MemoryDumpType& dump_type);
66 73
67 BASE_EXPORT const char* MemoryDumpLevelOfDetailToString( 74 BASE_EXPORT const char* MemoryDumpLevelOfDetailToString(
68 const MemoryDumpLevelOfDetail& level_of_detail); 75 const MemoryDumpLevelOfDetail& level_of_detail);
69 76
70 BASE_EXPORT MemoryDumpLevelOfDetail 77 BASE_EXPORT MemoryDumpLevelOfDetail
71 StringToMemoryDumpLevelOfDetail(const std::string& str); 78 StringToMemoryDumpLevelOfDetail(const std::string& str);
72 79
73 } // namespace trace_event 80 } // namespace trace_event
74 } // namespace base 81 } // namespace base
75 82
76 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_REQUEST_ARGS_H_ 83 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_REQUEST_ARGS_H_
OLDNEW
« no previous file with comments | « base/trace_event/memory_dump_provider.h ('k') | base/trace_event/memory_infra_background_whitelist.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698