Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(847)

Side by Side Diff: base/file_version_info_win.h

Issue 5968008: Update file version info/memory details/process utils to use string16.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/file_version_info_mac.mm ('k') | base/file_version_info_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_FILE_VERSION_INFO_WIN_H_ 5 #ifndef BASE_FILE_VERSION_INFO_WIN_H_
6 #define BASE_FILE_VERSION_INFO_WIN_H_ 6 #define BASE_FILE_VERSION_INFO_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/file_version_info.h" 12 #include "base/file_version_info.h"
13 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
14 14
15 struct tagVS_FIXEDFILEINFO; 15 struct tagVS_FIXEDFILEINFO;
16 typedef tagVS_FIXEDFILEINFO VS_FIXEDFILEINFO; 16 typedef tagVS_FIXEDFILEINFO VS_FIXEDFILEINFO;
17 17
18 // Provides a way to access the version information for a file.
19 // This is the information you access when you select a file in the Windows
20 // explorer, right-click select Properties, then click the Version tab.
21
22 class FileVersionInfoWin : public FileVersionInfo { 18 class FileVersionInfoWin : public FileVersionInfo {
23 public: 19 public:
24 FileVersionInfoWin(void* data, int language, int code_page); 20 FileVersionInfoWin(void* data, int language, int code_page);
25 ~FileVersionInfoWin(); 21 ~FileVersionInfoWin();
26 22
27 // Accessors to the different version properties. 23 // Accessors to the different version properties.
28 // Returns an empty string if the property is not found. 24 // Returns an empty string if the property is not found.
29 virtual std::wstring company_name(); 25 virtual string16 company_name();
30 virtual std::wstring company_short_name(); 26 virtual string16 company_short_name();
31 virtual std::wstring product_name(); 27 virtual string16 product_name();
32 virtual std::wstring product_short_name(); 28 virtual string16 product_short_name();
33 virtual std::wstring internal_name(); 29 virtual string16 internal_name();
34 virtual std::wstring product_version(); 30 virtual string16 product_version();
35 virtual std::wstring private_build(); 31 virtual string16 private_build();
36 virtual std::wstring special_build(); 32 virtual string16 special_build();
37 virtual std::wstring comments(); 33 virtual string16 comments();
38 virtual std::wstring original_filename(); 34 virtual string16 original_filename();
39 virtual std::wstring file_description(); 35 virtual string16 file_description();
40 virtual std::wstring file_version(); 36 virtual string16 file_version();
41 virtual std::wstring legal_copyright(); 37 virtual string16 legal_copyright();
42 virtual std::wstring legal_trademarks(); 38 virtual string16 legal_trademarks();
43 virtual std::wstring last_change(); 39 virtual string16 last_change();
44 virtual bool is_official_build(); 40 virtual bool is_official_build();
45 41
46 // Lets you access other properties not covered above. 42 // Lets you access other properties not covered above.
47 bool GetValue(const wchar_t* name, std::wstring* value); 43 bool GetValue(const wchar_t* name, std::wstring* value);
48 44
49 // Similar to GetValue but returns a wstring (empty string if the property 45 // Similar to GetValue but returns a wstring (empty string if the property
50 // does not exist). 46 // does not exist).
51 std::wstring GetStringValue(const wchar_t* name); 47 std::wstring GetStringValue(const wchar_t* name);
52 48
53 // Get the fixed file info if it exists. Otherwise NULL 49 // Get the fixed file info if it exists. Otherwise NULL
54 VS_FIXEDFILEINFO* fixed_file_info() { return fixed_file_info_; } 50 VS_FIXEDFILEINFO* fixed_file_info() { return fixed_file_info_; }
55 51
56 private: 52 private:
57 scoped_ptr_malloc<char> data_; 53 scoped_ptr_malloc<char> data_;
58 int language_; 54 int language_;
59 int code_page_; 55 int code_page_;
60 // This is a pointer into the data_ if it exists. Otherwise NULL. 56 // This is a pointer into the data_ if it exists. Otherwise NULL.
61 VS_FIXEDFILEINFO* fixed_file_info_; 57 VS_FIXEDFILEINFO* fixed_file_info_;
62 58
63 DISALLOW_COPY_AND_ASSIGN(FileVersionInfoWin); 59 DISALLOW_COPY_AND_ASSIGN(FileVersionInfoWin);
64 }; 60 };
65 61
66 #endif // BASE_FILE_VERSION_INFO_WIN_H_ 62 #endif // BASE_FILE_VERSION_INFO_WIN_H_
OLDNEW
« no previous file with comments | « base/file_version_info_mac.mm ('k') | base/file_version_info_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698