OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with 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 | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 23 matching lines...) Expand all Loading... |
34 class ModuleSnapshot; | 34 class ModuleSnapshot; |
35 | 35 |
36 //! \brief The writer for a MinidumpModuleCrashpadInfo object in a minidump | 36 //! \brief The writer for a MinidumpModuleCrashpadInfo object in a minidump |
37 //! file. | 37 //! file. |
38 class MinidumpModuleCrashpadInfoWriter final | 38 class MinidumpModuleCrashpadInfoWriter final |
39 : public internal::MinidumpWritable { | 39 : public internal::MinidumpWritable { |
40 public: | 40 public: |
41 MinidumpModuleCrashpadInfoWriter(); | 41 MinidumpModuleCrashpadInfoWriter(); |
42 ~MinidumpModuleCrashpadInfoWriter() override; | 42 ~MinidumpModuleCrashpadInfoWriter() override; |
43 | 43 |
44 //! \brief Initializes the MinidumpModuleCrashpadInfo based on \a | 44 //! \brief Initializes MinidumpModuleCrashpadInfo based on \a module_snapshot. |
45 //! module_snapshot. | |
46 //! | 45 //! |
47 //! Only data in \a module_snapshot that is considered useful will be | 46 //! Only data in \a module_snapshot that is considered useful will be |
48 //! included. For simple annotations, usefulness is determined by | 47 //! included. For simple annotations, usefulness is determined by |
49 //! MinidumpSimpleStringDictionaryWriter::IsUseful(). | 48 //! MinidumpSimpleStringDictionaryWriter::IsUseful(). |
50 //! | 49 //! |
51 //! \param[in] module_snapshot The module snapshot to use as source data. | 50 //! \param[in] module_snapshot The module snapshot to use as source data. |
52 //! \param[in] module_list_index The index of the MINIDUMP_MODULE initialized | 51 //! \param[in] module_list_index The index of the MINIDUMP_MODULE initialized |
53 //! from \a module_snapshot in the minidump file’s MINIDUMP_MODULE_LIST | 52 //! from \a module_snapshot in the minidump file’s MINIDUMP_MODULE_LIST |
54 //! stream. | 53 //! stream. |
55 //! | 54 //! |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 134 |
136 //! \brief Adds a MinidumpModuleCrashpadInfo to the | 135 //! \brief Adds a MinidumpModuleCrashpadInfo to the |
137 //! MinidumpModuleCrashpadInfoList. | 136 //! MinidumpModuleCrashpadInfoList. |
138 //! | 137 //! |
139 //! This object takes ownership of \a module and becomes its parent in the | 138 //! This object takes ownership of \a module and becomes its parent in the |
140 //! overall tree of internal::MinidumpWritable objects. | 139 //! overall tree of internal::MinidumpWritable objects. |
141 //! | 140 //! |
142 //! \note Valid in #kStateMutable. | 141 //! \note Valid in #kStateMutable. |
143 void AddModule(scoped_ptr<MinidumpModuleCrashpadInfoWriter> module); | 142 void AddModule(scoped_ptr<MinidumpModuleCrashpadInfoWriter> module); |
144 | 143 |
| 144 //! \brief Determines whether the object is useful. |
| 145 //! |
| 146 //! A useful object is one that carries data that makes a meaningful |
| 147 //! contribution to a minidump file. An object carrying children would be |
| 148 //! considered useful. |
| 149 //! |
| 150 //! \return `true` if the object is useful, `false` otherwise. |
| 151 bool IsUseful() const; |
| 152 |
145 private: | 153 private: |
146 DISALLOW_COPY_AND_ASSIGN(MinidumpModuleCrashpadInfoListWriter); | 154 DISALLOW_COPY_AND_ASSIGN(MinidumpModuleCrashpadInfoListWriter); |
147 }; | 155 }; |
148 | 156 |
149 } // namespace crashpad | 157 } // namespace crashpad |
150 | 158 |
151 #endif // CRASHPAD_MINIDUMP_MINIDUMP_MODULE_CRASHPAD_INFO_WRITER_H_ | 159 #endif // CRASHPAD_MINIDUMP_MINIDUMP_MODULE_CRASHPAD_INFO_WRITER_H_ |
OLD | NEW |