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

Side by Side Diff: minidump/minidump_stream_writer.h

Issue 432863006: Add MinidumpFileWriter (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback. Add MinidumpFileWriter test. Created 6 years, 4 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 2014 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_MINIDUMP_MINIDUMP_STREAM_WRITER_H_
16 #define CRASHPAD_MINIDUMP_MINIDUMP_STREAM_WRITER_H_
17
18 #include <dbghelp.h>
19 #include <stdint.h>
20
21 #include "base/basictypes.h"
22 #include "minidump/minidump_extensions.h"
23 #include "minidump/minidump_writable.h"
24
25 namespace crashpad {
26 namespace internal {
27
28 //! \brief The base class for all second-level objects (“streams”) in a minidump
29 //! file.
30 //!
31 //! Instances of subclasses of this class are children of the root-level
32 //! MinidumpFileWriter object.
33 class MinidumpStreamWriter : public MinidumpWritable {
34 public:
35 //! \brief Returns an object’s stream type.
36 //!
37 //! \note Valid in any state.
38 virtual MinidumpStreamType StreamType() const = 0;
39
40 //! \brief Returns a MINIDUMP_DIRECTORY entry that serves as a pointer to this
41 //! stream.
42 //!
43 //! This method is provided for MinidumpFileWriter, which calls it in order to
44 //! obtain the directory entry for a stream.
45 //!
46 //! \note Valid only in #kStateWritable.
47 const MINIDUMP_DIRECTORY* DirectoryListEntry() const;
48
49 protected:
50 MinidumpStreamWriter();
51 ~MinidumpStreamWriter() {}
52
53 // MinidumpWritable:
54 virtual bool Freeze() override;
55
56 private:
57 MINIDUMP_DIRECTORY directory_list_entry_;
58
59 DISALLOW_COPY_AND_ASSIGN(MinidumpStreamWriter);
60 };
61
62 } // namespace internal
63 } // namespace crashpad
64
65 #endif // CRASHPAD_MINIDUMP_STREAM_WRITER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698