mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-29 00:32:35 +08:00
4a9b858fbd
Intended for future use to implement util/file/file_writer. There's a similar class in base: https://code.google.com/p/chromium/codesearch#chromium/src/base/win/scoped_handle.h&l=28 However (perhaps for historical reasons) it does not distinguish between the possible types of HANDLEs which have different invalid values, resulting in a need to copy a bunch of code rather than simply using ScopedGeneric. Instead, distinguish between the types so the caller can use the correct one. Refs: http://blogs.msdn.com/b/oldnewthing/archive/2004/03/02/82639.aspx http://msdn.microsoft.com/en-us/magazine/cc302328.aspx (Figure 2) R=mark@chromium.org BUG=crashpad:1 Review URL: https://codereview.chromium.org/813873004