Chromium Code Reviews| Index: base/file_version_info_win.h |
| diff --git a/base/file_version_info_win.h b/base/file_version_info_win.h |
| index 1e152a86d6516079c3651907e2a5c64793a7b824..7b554c1e8cf020759f49eb06773b4c1793b4d0cc 100644 |
| --- a/base/file_version_info_win.h |
| +++ b/base/file_version_info_win.h |
| @@ -5,20 +5,21 @@ |
| #ifndef BASE_FILE_VERSION_INFO_WIN_H_ |
| #define BASE_FILE_VERSION_INFO_WIN_H_ |
| +#include <stdint.h> |
| + |
| #include <memory> |
| #include <string> |
| +#include <vector> |
| #include "base/base_export.h" |
| #include "base/file_version_info.h" |
| #include "base/macros.h" |
| -#include "base/memory/free_deleter.h" |
| struct tagVS_FIXEDFILEINFO; |
| typedef tagVS_FIXEDFILEINFO VS_FIXEDFILEINFO; |
| class BASE_EXPORT FileVersionInfoWin : public FileVersionInfo { |
| public: |
| - FileVersionInfoWin(void* data, WORD language, WORD code_page); |
| ~FileVersionInfoWin() override; |
| // Accessors to the different version properties. |
| @@ -51,11 +52,20 @@ class BASE_EXPORT FileVersionInfoWin : public FileVersionInfo { |
| VS_FIXEDFILEINFO* fixed_file_info() { return fixed_file_info_; } |
| private: |
| - std::unique_ptr<char, base::FreeDeleter> data_; |
| - WORD language_; |
| - WORD code_page_; |
| - // This is a pointer into the data_ if it exists. Otherwise NULL. |
| - VS_FIXEDFILEINFO* fixed_file_info_; |
| + friend FileVersionInfo; |
| + |
| + // |data| is a VS_VERSION_INFO resource. |language| and |code_page| are |
| + // extracted from the \VarFileInfo\Translation value of |data|. |
| + FileVersionInfoWin(std::vector<uint8_t> data, WORD language, WORD code_page); |
| + FileVersionInfoWin(void* data, WORD language, WORD code_page); |
| + |
| + const void* const data_; |
| + std::vector<uint8_t> owned_data_; |
|
grt (UTC plus 2)
2016/06/17 20:34:59
const
fdoray
2016/06/20 14:06:41
Doesn't work
https://codereview.chromium.org/20465
|
| + const WORD language_; |
| + const WORD code_page_; |
| + |
| + // This is a pointer into the data_ if it exists. Otherwise nullptr. |
| + VS_FIXEDFILEINFO* fixed_file_info_ = nullptr; |
| DISALLOW_COPY_AND_ASSIGN(FileVersionInfoWin); |
| }; |