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

Side by Side Diff: base/file_version_info.h

Issue 5815001: Fixed file_version_info so that it finds Mac values correctly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplified the change due to problems getting the older patch to work with chrome frame. 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 | « no previous file | base/file_version_info_mac.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_H__ 5 #ifndef BASE_FILE_VERSION_INFO_H__
6 #define BASE_FILE_VERSION_INFO_H__ 6 #define BASE_FILE_VERSION_INFO_H__
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 12
13 class FilePath; 13 class FilePath;
14 14
15 // Provides an interface for accessing the version information for a file. 15 // Provides an interface for accessing the version information for a file.
16 // This is the information you access when you select a file in the Windows 16 // This is the information you access when you select a file in the Windows
17 // explorer, right-click select Properties, then click the Version tab. 17 // explorer, right-click select Properties, then click the Version tab.
18 18
19 class FileVersionInfo { 19 class FileVersionInfo {
20 public: 20 public:
21 virtual ~FileVersionInfo() {} 21 virtual ~FileVersionInfo() {}
22 #if defined(OS_WIN) || defined(OS_MACOSX) 22 #if defined(OS_WIN) || defined(OS_MACOSX)
23 // Creates a FileVersionInfo for the specified path. Returns NULL if something 23 // Creates a FileVersionInfo for the specified path. Returns NULL if something
24 // goes wrong (typically the file does not exit or cannot be opened). The 24 // goes wrong (typically the file does not exit or cannot be opened). The
25 // returned object should be deleted when you are done with it. 25 // returned object should be deleted when you are done with it.
26 static FileVersionInfo* CreateFileVersionInfo(const FilePath& file_path); 26 static FileVersionInfo* CreateFileVersionInfo(const FilePath& file_path);
27 #endif // OS_WIN || OS_MACOSX
28
29 #if defined(OS_WIN)
27 // This version, taking a wstring, is deprecated and only kept around 30 // This version, taking a wstring, is deprecated and only kept around
28 // until we can fix all callers. 31 // until we can fix all callers.
29 static FileVersionInfo* CreateFileVersionInfo(const std::wstring& file_path); 32 static FileVersionInfo* CreateFileVersionInfo(const std::wstring& file_path);
30 #endif 33 #endif // OS_WIN
31 34
32 // Creates a FileVersionInfo for the current module. Returns NULL in case 35 // Creates a FileVersionInfo for the current module. Returns NULL in case
33 // of error. The returned object should be deleted when you are done with it. 36 // of error. The returned object should be deleted when you are done with it.
34 static FileVersionInfo* CreateFileVersionInfoForCurrentModule(); 37 static FileVersionInfo* CreateFileVersionInfoForCurrentModule();
35 38
36 // Accessors to the different version properties. 39 // Accessors to the different version properties.
37 // Returns an empty string if the property is not found. 40 // Returns an empty string if the property is not found.
38 virtual std::wstring company_name() = 0; 41 virtual std::wstring company_name() = 0;
39 virtual std::wstring company_short_name() = 0; 42 virtual std::wstring company_short_name() = 0;
40 virtual std::wstring product_name() = 0; 43 virtual std::wstring product_name() = 0;
41 virtual std::wstring product_short_name() = 0; 44 virtual std::wstring product_short_name() = 0;
42 virtual std::wstring internal_name() = 0; 45 virtual std::wstring internal_name() = 0;
43 virtual std::wstring product_version() = 0; 46 virtual std::wstring product_version() = 0;
44 virtual std::wstring private_build() = 0; 47 virtual std::wstring private_build() = 0;
45 virtual std::wstring special_build() = 0; 48 virtual std::wstring special_build() = 0;
46 virtual std::wstring comments() = 0; 49 virtual std::wstring comments() = 0;
47 virtual std::wstring original_filename() = 0; 50 virtual std::wstring original_filename() = 0;
48 virtual std::wstring file_description() = 0; 51 virtual std::wstring file_description() = 0;
49 virtual std::wstring file_version() = 0; 52 virtual std::wstring file_version() = 0;
50 virtual std::wstring legal_copyright() = 0; 53 virtual std::wstring legal_copyright() = 0;
51 virtual std::wstring legal_trademarks() = 0; 54 virtual std::wstring legal_trademarks() = 0;
52 virtual std::wstring last_change() = 0; 55 virtual std::wstring last_change() = 0;
53 virtual bool is_official_build() = 0; 56 virtual bool is_official_build() = 0;
54 }; 57 };
55 58
56 #endif // BASE_FILE_VERSION_INFO_H__ 59 #endif // BASE_FILE_VERSION_INFO_H__
OLDNEW
« no previous file with comments | « no previous file | base/file_version_info_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698