| Index: third_party/crashpad/crashpad/util/posix/scoped_dir.h
|
| diff --git a/third_party/crashpad/crashpad/minidump/minidump_user_extension_stream_data_source.cc b/third_party/crashpad/crashpad/util/posix/scoped_dir.h
|
| similarity index 58%
|
| copy from third_party/crashpad/crashpad/minidump/minidump_user_extension_stream_data_source.cc
|
| copy to third_party/crashpad/crashpad/util/posix/scoped_dir.h
|
| index 8056011cf021b0cccafdbcf6286caf9e0f70ed5a..2eade40e8f0f959fefb0cde6d55f1ba6fc58aa5f 100644
|
| --- a/third_party/crashpad/crashpad/minidump/minidump_user_extension_stream_data_source.cc
|
| +++ b/third_party/crashpad/crashpad/util/posix/scoped_dir.h
|
| @@ -12,19 +12,27 @@
|
| // See the License for the specific language governing permissions and
|
| // limitations under the License.
|
|
|
| -#include "minidump/minidump_user_extension_stream_data_source.h"
|
| +#ifndef CRASHPAD_UTIL_POSIX_SCOPED_DIR_H_
|
| +#define CRASHPAD_UTIL_POSIX_SCOPED_DIR_H_
|
| +
|
| +#include <dirent.h>
|
| +
|
| +#include <memory>
|
|
|
| namespace crashpad {
|
| +namespace internal {
|
|
|
| -MinidumpUserExtensionStreamDataSource::MinidumpUserExtensionStreamDataSource(
|
| - uint32_t stream_type,
|
| - const void* buffer,
|
| - size_t buffer_size)
|
| - : stream_type_(static_cast<MinidumpStreamType>(stream_type)),
|
| - buffer_(buffer),
|
| - buffer_size_(buffer_size) {}
|
| +struct ScopedDIRCloser {
|
| + void operator()(DIR* dir) const;
|
| +};
|
|
|
| -MinidumpUserExtensionStreamDataSource::
|
| - ~MinidumpUserExtensionStreamDataSource() {}
|
| +} // namespace internal
|
| +
|
| +//! \brief Maintains a directory opened by `opendir`.
|
| +//!
|
| +//! On destruction, the directory will be closed by calling `closedir`.
|
| +using ScopedDIR = std::unique_ptr<DIR, internal::ScopedDIRCloser>;
|
|
|
| } // namespace crashpad
|
| +
|
| +#endif // CRASHPAD_UTIL_POSIX_SCOPED_DIR_H_
|
|
|