security/sandbox/chromium/base/file_version_info_win.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/sandbox/chromium/base/file_version_info_win.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,62 @@
     1.4 +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
     1.5 +// Use of this source code is governed by a BSD-style license that can be
     1.6 +// found in the LICENSE file.
     1.7 +
     1.8 +#ifndef BASE_FILE_VERSION_INFO_WIN_H_
     1.9 +#define BASE_FILE_VERSION_INFO_WIN_H_
    1.10 +
    1.11 +#include <string>
    1.12 +
    1.13 +#include "base/base_export.h"
    1.14 +#include "base/basictypes.h"
    1.15 +#include "base/file_version_info.h"
    1.16 +#include "base/memory/scoped_ptr.h"
    1.17 +
    1.18 +struct tagVS_FIXEDFILEINFO;
    1.19 +typedef tagVS_FIXEDFILEINFO VS_FIXEDFILEINFO;
    1.20 +
    1.21 +class FileVersionInfoWin : public FileVersionInfo {
    1.22 + public:
    1.23 +  BASE_EXPORT FileVersionInfoWin(void* data, int language, int code_page);
    1.24 +  BASE_EXPORT ~FileVersionInfoWin();
    1.25 +
    1.26 +  // Accessors to the different version properties.
    1.27 +  // Returns an empty string if the property is not found.
    1.28 +  virtual string16 company_name() OVERRIDE;
    1.29 +  virtual string16 company_short_name() OVERRIDE;
    1.30 +  virtual string16 product_name() OVERRIDE;
    1.31 +  virtual string16 product_short_name() OVERRIDE;
    1.32 +  virtual string16 internal_name() OVERRIDE;
    1.33 +  virtual string16 product_version() OVERRIDE;
    1.34 +  virtual string16 private_build() OVERRIDE;
    1.35 +  virtual string16 special_build() OVERRIDE;
    1.36 +  virtual string16 comments() OVERRIDE;
    1.37 +  virtual string16 original_filename() OVERRIDE;
    1.38 +  virtual string16 file_description() OVERRIDE;
    1.39 +  virtual string16 file_version() OVERRIDE;
    1.40 +  virtual string16 legal_copyright() OVERRIDE;
    1.41 +  virtual string16 legal_trademarks() OVERRIDE;
    1.42 +  virtual string16 last_change() OVERRIDE;
    1.43 +  virtual bool is_official_build() OVERRIDE;
    1.44 +
    1.45 +  // Lets you access other properties not covered above.
    1.46 +  BASE_EXPORT bool GetValue(const wchar_t* name, std::wstring* value);
    1.47 +
    1.48 +  // Similar to GetValue but returns a wstring (empty string if the property
    1.49 +  // does not exist).
    1.50 +  BASE_EXPORT std::wstring GetStringValue(const wchar_t* name);
    1.51 +
    1.52 +  // Get the fixed file info if it exists. Otherwise NULL
    1.53 +  VS_FIXEDFILEINFO* fixed_file_info() { return fixed_file_info_; }
    1.54 +
    1.55 + private:
    1.56 +  scoped_ptr_malloc<char> data_;
    1.57 +  int language_;
    1.58 +  int code_page_;
    1.59 +  // This is a pointer into the data_ if it exists. Otherwise NULL.
    1.60 +  VS_FIXEDFILEINFO* fixed_file_info_;
    1.61 +
    1.62 +  DISALLOW_COPY_AND_ASSIGN(FileVersionInfoWin);
    1.63 +};
    1.64 +
    1.65 +#endif  // BASE_FILE_VERSION_INFO_WIN_H_

mercurial