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

Side by Side Diff: minidump/minidump_location_descriptor_list_writer.h

Issue 699313007: minidump: Use the crashpad::internal namespace more appropriately (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | minidump/minidump_location_descriptor_list_writer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and 12 // See the License for the specific language governing permissions and
13 // limitations under the License. 13 // limitations under the License.
14 14
15 #ifndef CRASHPAD_MINIDUMP_LOCATION_DESCRIPTOR_LIST_WRITER_H_ 15 #ifndef CRASHPAD_MINIDUMP_LOCATION_DESCRIPTOR_LIST_WRITER_H_
16 #define CRASHPAD_MINIDUMP_LOCATION_DESCRIPTOR_LIST_WRITER_H_ 16 #define CRASHPAD_MINIDUMP_LOCATION_DESCRIPTOR_LIST_WRITER_H_
17 17
18 #include <stdint.h> 18 #include <stdint.h>
19 #include <sys/types.h> 19 #include <sys/types.h>
20 20
21 #include <vector> 21 #include <vector>
22 22
23 #include "base/basictypes.h" 23 #include "base/basictypes.h"
24 #include "base/memory/scoped_ptr.h" 24 #include "base/memory/scoped_ptr.h"
25 #include "minidump/minidump_extensions.h" 25 #include "minidump/minidump_extensions.h"
26 #include "minidump/minidump_writable.h" 26 #include "minidump/minidump_writable.h"
27 #include "util/stdlib/pointer_container.h" 27 #include "util/stdlib/pointer_container.h"
28 28
29 namespace crashpad { 29 namespace crashpad {
30 namespace internal {
30 31
31 //! \brief The writer for a MinidumpLocationDescriptorList object in a minidump 32 //! \brief The writer for a MinidumpLocationDescriptorList object in a minidump
32 //! file, containing a list of MINIDUMP_LOCATION_DESCRIPTOR objects. 33 //! file, containing a list of MINIDUMP_LOCATION_DESCRIPTOR objects.
33 class MinidumpLocationDescriptorListWriter : public internal::MinidumpWritable { 34 class MinidumpLocationDescriptorListWriter : public MinidumpWritable {
34 protected: 35 protected:
35 MinidumpLocationDescriptorListWriter(); 36 MinidumpLocationDescriptorListWriter();
36 ~MinidumpLocationDescriptorListWriter() override; 37 ~MinidumpLocationDescriptorListWriter() override;
37 38
38 //! \brief Adds a MINIDUMP_LOCATION_DESCRIPTOR referencing an 39 //! \brief Adds a MINIDUMP_LOCATION_DESCRIPTOR referencing a MinidumpWritable
39 //! internal::MinidumpWritable to the MinidumpLocationDescriptorList. 40 //! to the MinidumpLocationDescriptorList.
40 //! 41 //!
41 //! This object takes ownership of \a child and becomes its parent in the 42 //! This object takes ownership of \a child and becomes its parent in the
42 //! overall tree of internal::MinidumpWritable objects. 43 //! overall tree of MinidumpWritable objects.
43 //! 44 //!
44 //! To provide type-correctness, subclasses are expected to provide a public 45 //! To provide type-correctness, subclasses are expected to provide a public
45 //! method that accepts a `scoped_ptr`-wrapped argument of the proper 46 //! method that accepts a `scoped_ptr`-wrapped argument of the proper
46 //! internal::MinidumpWritable subclass, and call this method with that 47 //! MinidumpWritable subclass, and call this method with that argument.
47 //! argument.
48 //! 48 //!
49 //! \note Valid in #kStateMutable. 49 //! \note Valid in #kStateMutable.
50 void AddChild(scoped_ptr<MinidumpWritable> child); 50 void AddChild(scoped_ptr<MinidumpWritable> child);
51 51
52 //! \brief Returns `true` if no child objects have been added by AddChild(), 52 //! \brief Returns `true` if no child objects have been added by AddChild(),
53 //! and `false` if child objects are present. 53 //! and `false` if child objects are present.
54 bool IsEmpty() const { return children_.empty(); } 54 bool IsEmpty() const { return children_.empty(); }
55 55
56 //! \brief Returns an object’s MINIDUMP_LOCATION_DESCRIPTOR objects 56 //! \brief Returns an object’s MINIDUMP_LOCATION_DESCRIPTOR objects
57 //! referencing its children. 57 //! referencing its children.
(...skipping 12 matching lines...) Expand all
70 bool WriteObject(FileWriterInterface* file_writer) override; 70 bool WriteObject(FileWriterInterface* file_writer) override;
71 71
72 private: 72 private:
73 MinidumpLocationDescriptorList location_descriptor_list_base_; 73 MinidumpLocationDescriptorList location_descriptor_list_base_;
74 PointerVector<MinidumpWritable> children_; 74 PointerVector<MinidumpWritable> children_;
75 std::vector<MINIDUMP_LOCATION_DESCRIPTOR> child_location_descriptors_; 75 std::vector<MINIDUMP_LOCATION_DESCRIPTOR> child_location_descriptors_;
76 76
77 DISALLOW_COPY_AND_ASSIGN(MinidumpLocationDescriptorListWriter); 77 DISALLOW_COPY_AND_ASSIGN(MinidumpLocationDescriptorListWriter);
78 }; 78 };
79 79
80 } // namespace internal
80 } // namespace crashpad 81 } // namespace crashpad
81 82
82 #endif // CRASHPAD_MINIDUMP_LOCATION_DESCRIPTOR_LIST_WRITER_H_ 83 #endif // CRASHPAD_MINIDUMP_LOCATION_DESCRIPTOR_LIST_WRITER_H_
OLDNEW
« no previous file with comments | « no previous file | minidump/minidump_location_descriptor_list_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698