OLD | NEW |
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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/file_path.h" | |
12 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
13 | 12 |
14 #if defined(OS_WIN) | 13 #if defined(OS_WIN) |
15 struct tagVS_FIXEDFILEINFO; | 14 struct tagVS_FIXEDFILEINFO; |
16 typedef tagVS_FIXEDFILEINFO VS_FIXEDFILEINFO; | 15 typedef tagVS_FIXEDFILEINFO VS_FIXEDFILEINFO; |
17 #elif defined(OS_MACOSX) | 16 #elif defined(OS_MACOSX) |
18 #ifdef __OBJC__ | 17 #ifdef __OBJC__ |
19 @class NSBundle; | 18 @class NSBundle; |
20 #else | 19 #else |
21 class NSBundle; | 20 class NSBundle; |
22 #endif | 21 #endif |
23 #endif | 22 #endif |
24 | 23 |
| 24 class FilePath; |
| 25 |
25 // Provides a way to access the version information for a file. | 26 // Provides a way to access the version information for a file. |
26 // This is the information you access when you select a file in the Windows | 27 // This is the information you access when you select a file in the Windows |
27 // explorer, right-click select Properties, then click the Version tab. | 28 // explorer, right-click select Properties, then click the Version tab. |
28 | 29 |
29 class FileVersionInfo { | 30 class FileVersionInfo { |
30 public: | 31 public: |
31 // Creates a FileVersionInfo for the specified path. Returns NULL if something | 32 // Creates a FileVersionInfo for the specified path. Returns NULL if something |
32 // goes wrong (typically the file does not exit or cannot be opened). The | 33 // goes wrong (typically the file does not exit or cannot be opened). The |
33 // returned object should be deleted when you are done with it. | 34 // returned object should be deleted when you are done with it. |
34 static FileVersionInfo* CreateFileVersionInfo(const FilePath& file_path); | 35 static FileVersionInfo* CreateFileVersionInfo(const FilePath& file_path); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 88 |
88 NSBundle *bundle_; | 89 NSBundle *bundle_; |
89 #elif defined(OS_LINUX) | 90 #elif defined(OS_LINUX) |
90 FileVersionInfo(); | 91 FileVersionInfo(); |
91 #endif | 92 #endif |
92 | 93 |
93 DISALLOW_EVIL_CONSTRUCTORS(FileVersionInfo); | 94 DISALLOW_EVIL_CONSTRUCTORS(FileVersionInfo); |
94 }; | 95 }; |
95 | 96 |
96 #endif // BASE_FILE_VERSION_INFO_H__ | 97 #endif // BASE_FILE_VERSION_INFO_H__ |
OLD | NEW |