security/sandbox/chromium/base/file_version_info_win.h

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

michael@0 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
michael@0 2 // Use of this source code is governed by a BSD-style license that can be
michael@0 3 // found in the LICENSE file.
michael@0 4
michael@0 5 #ifndef BASE_FILE_VERSION_INFO_WIN_H_
michael@0 6 #define BASE_FILE_VERSION_INFO_WIN_H_
michael@0 7
michael@0 8 #include <string>
michael@0 9
michael@0 10 #include "base/base_export.h"
michael@0 11 #include "base/basictypes.h"
michael@0 12 #include "base/file_version_info.h"
michael@0 13 #include "base/memory/scoped_ptr.h"
michael@0 14
michael@0 15 struct tagVS_FIXEDFILEINFO;
michael@0 16 typedef tagVS_FIXEDFILEINFO VS_FIXEDFILEINFO;
michael@0 17
michael@0 18 class FileVersionInfoWin : public FileVersionInfo {
michael@0 19 public:
michael@0 20 BASE_EXPORT FileVersionInfoWin(void* data, int language, int code_page);
michael@0 21 BASE_EXPORT ~FileVersionInfoWin();
michael@0 22
michael@0 23 // Accessors to the different version properties.
michael@0 24 // Returns an empty string if the property is not found.
michael@0 25 virtual string16 company_name() OVERRIDE;
michael@0 26 virtual string16 company_short_name() OVERRIDE;
michael@0 27 virtual string16 product_name() OVERRIDE;
michael@0 28 virtual string16 product_short_name() OVERRIDE;
michael@0 29 virtual string16 internal_name() OVERRIDE;
michael@0 30 virtual string16 product_version() OVERRIDE;
michael@0 31 virtual string16 private_build() OVERRIDE;
michael@0 32 virtual string16 special_build() OVERRIDE;
michael@0 33 virtual string16 comments() OVERRIDE;
michael@0 34 virtual string16 original_filename() OVERRIDE;
michael@0 35 virtual string16 file_description() OVERRIDE;
michael@0 36 virtual string16 file_version() OVERRIDE;
michael@0 37 virtual string16 legal_copyright() OVERRIDE;
michael@0 38 virtual string16 legal_trademarks() OVERRIDE;
michael@0 39 virtual string16 last_change() OVERRIDE;
michael@0 40 virtual bool is_official_build() OVERRIDE;
michael@0 41
michael@0 42 // Lets you access other properties not covered above.
michael@0 43 BASE_EXPORT bool GetValue(const wchar_t* name, std::wstring* value);
michael@0 44
michael@0 45 // Similar to GetValue but returns a wstring (empty string if the property
michael@0 46 // does not exist).
michael@0 47 BASE_EXPORT std::wstring GetStringValue(const wchar_t* name);
michael@0 48
michael@0 49 // Get the fixed file info if it exists. Otherwise NULL
michael@0 50 VS_FIXEDFILEINFO* fixed_file_info() { return fixed_file_info_; }
michael@0 51
michael@0 52 private:
michael@0 53 scoped_ptr_malloc<char> data_;
michael@0 54 int language_;
michael@0 55 int code_page_;
michael@0 56 // This is a pointer into the data_ if it exists. Otherwise NULL.
michael@0 57 VS_FIXEDFILEINFO* fixed_file_info_;
michael@0 58
michael@0 59 DISALLOW_COPY_AND_ASSIGN(FileVersionInfoWin);
michael@0 60 };
michael@0 61
michael@0 62 #endif // BASE_FILE_VERSION_INFO_WIN_H_

mercurial