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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 //! most other data, memory snapshots are large and the entire snapshots do | 126 //! most other data, memory snapshots are large and the entire snapshots do |
127 //! not need to be consulted in order to process a minidump file. | 127 //! not need to be consulted in order to process a minidump file. |
128 kPhaseLate, | 128 kPhaseLate, |
129 }; | 129 }; |
130 | 130 |
131 //! \brief A size value used to signal failure by methods that return | 131 //! \brief A size value used to signal failure by methods that return |
132 //! `size_t`. | 132 //! `size_t`. |
133 static const size_t kInvalidSize; | 133 static const size_t kInvalidSize; |
134 | 134 |
135 MinidumpWritable(); | 135 MinidumpWritable(); |
136 ~MinidumpWritable(); | 136 |
| 137 // This doesn’t really need to be virtual because nothing ever deletes a |
| 138 // MinidumpWritable* through an interface pointer with that type, and this is |
| 139 // guaranteed by being protected. Regardless, the style guide is somewhat |
| 140 // insistent. |
| 141 // http://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Inheritance |
| 142 virtual ~MinidumpWritable(); |
137 | 143 |
138 //! \brief The state of the object. | 144 //! \brief The state of the object. |
139 State state() const { return state_; } | 145 State state() const { return state_; } |
140 | 146 |
141 //! \brief Transitions the object from #kStateMutable to #kStateFrozen. | 147 //! \brief Transitions the object from #kStateMutable to #kStateFrozen. |
142 //! | 148 //! |
143 //! The default implementation marks the object as frozen and recursively | 149 //! The default implementation marks the object as frozen and recursively |
144 //! calls Freeze() on all of its children. Subclasses may override this method | 150 //! calls Freeze() on all of its children. Subclasses may override this method |
145 //! to perform processing that should only be done once callers have finished | 151 //! to perform processing that should only be done once callers have finished |
146 //! populating an object with data. Typically, a subclass implementation would | 152 //! populating an object with data. Typically, a subclass implementation would |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 size_t leading_pad_bytes_; | 273 size_t leading_pad_bytes_; |
268 State state_; | 274 State state_; |
269 | 275 |
270 DISALLOW_COPY_AND_ASSIGN(MinidumpWritable); | 276 DISALLOW_COPY_AND_ASSIGN(MinidumpWritable); |
271 }; | 277 }; |
272 | 278 |
273 } // namespace internal | 279 } // namespace internal |
274 } // namespace crashpad | 280 } // namespace crashpad |
275 | 281 |
276 #endif // CRASHPAD_MINIDUMP_MINIDUMP_WRITABLE_H_ | 282 #endif // CRASHPAD_MINIDUMP_MINIDUMP_WRITABLE_H_ |
OLD | NEW |