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

Side by Side Diff: third_party/crashpad/crashpad/handler/user_stream_data_source.h

Issue 2814043003: Update Crashpad to 1f28a123a4c9449e3d7ddad4ff00dacd366d5216 (Closed)
Patch Set: Add missing GN config to fix compile/link. Created 3 years, 8 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
(Empty)
1 // Copyright 2017 The Crashpad Authors. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 #ifndef CRASHPAD_HANDLER_USER_STREAM_DATA_SOURCE_H_
16 #define CRASHPAD_HANDLER_USER_STREAM_DATA_SOURCE_H_
17
18 #include <memory>
19 #include <vector>
20
21 namespace crashpad {
22
23 class MinidumpFileWriter;
24 class MinidumpUserExtensionStreamDataSource;
25 class ProcessSnapshot;
26
27 //! \brief Extensibility interface for embedders who wish to add custom streams
28 //! to minidumps.
29 class UserStreamDataSource {
30 public:
31 virtual ~UserStreamDataSource() {}
32
33 //! \brief Produce the contents for an extension stream for a crashed program.
34 //!
35 //! Called after \a process_snapshot has been initialized for the crashed
36 //! process to (optionally) produce the contents of a user extension stream
37 //! that will be attached to the minidump.
38 //!
39 //! \param[in] process_snapshot An initialized snapshot for the crashed
40 //! process.
41 //!
42 //! \return A new data source for the stream to add to the minidump or
43 //! `nullptr` on failure or to opt out of adding a stream.
44 virtual std::unique_ptr<MinidumpUserExtensionStreamDataSource>
45 ProduceStreamData(ProcessSnapshot* process_snapshot) = 0;
46 };
47
48 using UserStreamDataSources =
49 std::vector<std::unique_ptr<UserStreamDataSource>>;
50
51 //! \brief Adds user extension streams to a minidump.
52 //!
53 //! Dispatches to each source in \a user_stream_data_sources and adds returned
54 //! extension streams to \a minidump_file_writer.
55 //!
56 //! \param[in] user_stream_data_sources A pointer to the data sources, or
57 //! `nullptr`.
58 //! \param[in] process_snapshot An initialized snapshot to the crashing process.
59 //! \param[in] minidump_file_writer Any extension streams will be added to this
60 //! minidump.
61 void AddUserExtensionStreams(
62 const UserStreamDataSources* user_stream_data_sources,
63 ProcessSnapshot* process_snapshot,
64 MinidumpFileWriter* minidump_file_writer);
65
66 } // namespace crashpad
67
68 #endif // CRASHPAD_HANDLER_USER_STREAM_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « third_party/crashpad/crashpad/handler/main.cc ('k') | third_party/crashpad/crashpad/handler/user_stream_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698