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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 // MinidumpWritable: | 56 // MinidumpWritable: |
57 | 57 |
58 //! \copydoc internal::MinidumpWritable::WriteEverything() | 58 //! \copydoc internal::MinidumpWritable::WriteEverything() |
59 //! | 59 //! |
60 //! This method does not initially write the final value for | 60 //! This method does not initially write the final value for |
61 //! MINIDUMP_HEADER::Signature. After all child objects have been written, it | 61 //! MINIDUMP_HEADER::Signature. After all child objects have been written, it |
62 //! rewinds to the beginning of the file and writes the correct value for this | 62 //! rewinds to the beginning of the file and writes the correct value for this |
63 //! field. This prevents incompletely-written minidump files from being | 63 //! field. This prevents incompletely-written minidump files from being |
64 //! mistaken for valid ones. | 64 //! mistaken for valid ones. |
65 virtual bool WriteEverything(FileWriterInterface* file_writer) override; | 65 bool WriteEverything(FileWriterInterface* file_writer) override; |
66 | 66 |
67 protected: | 67 protected: |
68 // MinidumpWritable: | 68 // MinidumpWritable: |
69 virtual bool Freeze() override; | 69 bool Freeze() override; |
70 virtual size_t SizeOfObject() override; | 70 size_t SizeOfObject() override; |
71 virtual std::vector<MinidumpWritable*> Children() override; | 71 std::vector<MinidumpWritable*> Children() override; |
72 virtual bool WillWriteAtOffsetImpl(off_t offset) override; | 72 bool WillWriteAtOffsetImpl(off_t offset) override; |
73 virtual bool WriteObject(FileWriterInterface* file_writer) override; | 73 bool WriteObject(FileWriterInterface* file_writer) override; |
74 | 74 |
75 private: | 75 private: |
76 MINIDUMP_HEADER header_; | 76 MINIDUMP_HEADER header_; |
77 std::vector<internal::MinidumpStreamWriter*> streams_; // weak | 77 std::vector<internal::MinidumpStreamWriter*> streams_; // weak |
78 | 78 |
79 // Protects against multiple streams with the same ID being added. | 79 // Protects against multiple streams with the same ID being added. |
80 std::set<MinidumpStreamType> stream_types_; | 80 std::set<MinidumpStreamType> stream_types_; |
81 | 81 |
82 DISALLOW_COPY_AND_ASSIGN(MinidumpFileWriter); | 82 DISALLOW_COPY_AND_ASSIGN(MinidumpFileWriter); |
83 }; | 83 }; |
84 | 84 |
85 } // namespace crashpad | 85 } // namespace crashpad |
86 | 86 |
87 #endif // CRASHPAD_MINIDUMP_MINIDUMP_WRITER_H_ | 87 #endif // CRASHPAD_MINIDUMP_MINIDUMP_WRITER_H_ |
OLD | NEW |