Chromium Code Reviews| Index: chrome/utility/safe_browsing/mac/udif.h |
| diff --git a/chrome/utility/safe_browsing/mac/udif.h b/chrome/utility/safe_browsing/mac/udif.h |
| index fbb17c9280743e2611deba7d9955657f8e175413..6b9d46d26176864e68c33d1e54c68cad71e93af4 100644 |
| --- a/chrome/utility/safe_browsing/mac/udif.h |
| +++ b/chrome/utility/safe_browsing/mac/udif.h |
| @@ -23,6 +23,8 @@ namespace dmg { |
| class ReadStream; |
| class UDIFBlock; |
|
Robert Sesek
2017/06/12 20:52:34
nit: no blank line (and sort by type name between
mortonm
2017/06/12 21:39:49
Done.
|
| +struct UDIFResourceFile; |
| + |
| // UDIFParser parses a Universal Disk Image Format file, allowing access to the |
| // name, types, and data of the partitions held within the file. There is no |
| // canonical documentation for UDIF, and not all disk images use UDIF (though |
| @@ -71,7 +73,12 @@ class UDIFParser { |
| std::unique_ptr<ReadStream> GetPartitionReadStream(size_t part_number); |
| private: |
| - // Parses the blkx plist trailer structure. |
| + // Parses the trailer structure. Only actually parses data from the file the |
| + // first time it is called -- after that just returns the previous result when |
| + // parsing was attempted. |
| + bool ParseTrailer(); |
| + |
| + // Parses the blkx plist structure. |
| bool ParseBlkx(); |
| ReadStream* const stream_; // The stream backing the UDIF image. Weak. |
| @@ -79,6 +86,8 @@ class UDIFParser { |
| // All blocks in the UDIF image. |
| std::vector<std::unique_ptr<const UDIFBlock>> blocks_; |
| uint16_t block_size_; // The image's block size, in bytes. |
| + std::unique_ptr<UDIFResourceFile> trailer_; |
|
Robert Sesek
2017/06/12 20:52:34
These two members need comments.
mortonm
2017/06/12 21:39:49
Done.
|
| + bool trailer_successfully_parsed_; |
| DISALLOW_COPY_AND_ASSIGN(UDIFParser); |
| }; |